ahau-graphql-client
Advanced tools
Comparing version 0.0.4 to 0.0.5
const { ApolloClient, InMemoryCache, gql } = require('@apollo/client') | ||
const { createUploadLink } = require('apollo-upload-client') // partners with graphql-upload | ||
// await new Promise(resolve => ssb.ahau.onReady(resolve)) | ||
export default class AhauGraphqlClient extends ApolloClient { | ||
constructor (uri, opts = {}) { | ||
if (!uri) throw new Error(`graphql uri required, got ${uri}`) | ||
if (typeof uri === 'number') uri = `http://localhost:${uri}/graphql` | ||
@@ -10,0 +9,0 @@ const isBrowser = typeof window !== 'undefined' |
{ | ||
"name": "ahau-graphql-client", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "apollo graphql client for ahau apps", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -19,2 +19,3 @@ # ahau-graphql-client | ||
- `uri` *String* 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` | ||
- `opts` *Object* (optional) lets you set: | ||
@@ -21,0 +22,0 @@ - `opts.possibleTypes` *Object* for [resolving fragments](https://www.apollographql.com/docs/react/data/fragments/) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3108
27