0.2.1 • Published 7 years ago
nick-origin-graphql v0.2.1
Origin GraphQL
This experimental package provides a GraphQL interface to Origin Protocol
intended to be consumed by ApolloClient. It uses apollo-link-schema to
expose a client-side GraphQL server that can also be used server side.
This means a UI is able to leverage the power of GraphQL without depending on a centralized server. The only server side dependencies are an Ethereum node and and an IPFS server.
A GraphiQL demo is available here
Key files
src/index.jsexposes an ApolloClient instance.src/contracts.jsmanages connections and subscriptions to an Ethereum node.src/typeDefsGraphQL type definitions.src/resolversquery resolvers.src/mutationsmutation resolvers. Code for executing mutations.src/utils/OriginEventSourceget the current state of listings or offers.src/utils/eventCacheCaches events from an Ethereum node.