apollo-link-reactive-schema
Apollo Link that provides a reactive-graphql execution environment to perform operations on a provided reactive schema.
Installation
npm install apollo-link-reactive-schema --save
Usage
;;;;; ; const graphqlClient = cache: link: schema ; const query = gql` # don't forget the @live directive, otherwise you'll experience # difficulties with subscription>unsubscription>subscription query @live { someReactiveField }`; const $res = graphqlClient;$res;
Options
The ReactiveSchemaLink
constructor can be called with an object with the following properties:
schema
: an executable graphql schemacontext
: an object passed to the resolvers, following the graphql specification or a function that accepts the operation and returns the resolver context.