ahau-graphql-client
v2.0.0
Published
apollo graphql client for ahau apps
Readme
ahau-graphql-client
Example Usage
const AhauClient = require('ahau-graphql-client')
const client = new AhauClient(uri, opts)
// client.query(...)API
new AhauClient(uri, opts) => client
where:
uriString is the http endpoint of your graphql server- if Number, it's assumed to be a port, and uri will be set to
http://localhost:${port}/graphql
- if Number, it's assumed to be a port, and uri will be set to
optsObject (optional) lets you set:opts.possibleTypesObject for resolving fragmentsopts.fetchFunction for providing a custom fetch function. This is required when not in the browseropts.apolloClientObject for setting or over-riding other apollo client options
and returns client - an @apollo/client instance
