Skip to content
This repository has been archived by the owner on Apr 17, 2019. It is now read-only.

0.0.10

Pre-release
Pre-release
Compare
Choose a tag to compare
@djhi djhi released this 11 May 14:19
· 9 commits to master since this release

Support for custom GraphQL flavors.

It should be easier to customize queries for services such as graphcool.

BREAKING CHANGES:

There is no introspection.template option anymore. In order to achieve the same result without implementing a full new flavor, just create your flavor like this:

// In myFlavor.js
import pluralize from 'pluralize';
import defaultFlavor from 'aor-simple-graphql-client/lib/flavors/default';

const myFlavor = {
     ...defaultFlavor
     GET_LIST: {
          ....defaultFlavor.GET_LIST
          operationName: (resourceType) => `getPageOf${pluralize(resourceType.name)}`, // Override the name here
     },
     ...
};