Releases: nearform/graphql-hooks
Releases · nearform/graphql-hooks
v3.2.1
v3.2.0
- chore(deps): update dependency rollup to v1.3.2 (#73) 1a46d08
- Use rollup to generate bundles for UMD, ESM and CJS (#63) ae154d3
- feat: remove all-contributors cli (#71) d89e405
- docs: add jh3y as a contributor (#70) 667f739
- feat: remove package-lock.json (#65) (#67) a4b5587
- add bug & feature labels to issue templates (#66) 38477e3
V3.1.1
v3.1.0
v3.0.0
v2.0.4
v2.0.3
v2.0.2
v2.0.1
v2.0.0
Pull Requests
Summary
Breaking changes:
createClient
->GraphQLClient
class- config changes
endpoint
->url
fetch
: optional function to specify the fetch implementation | defaults to global fetch
Additions
- New config options to
new GraphQLClient(config)
:logErrors
: Boolean | default trueonError
: Function - custom error handler will receive ({ result, operation }) as the argument
- New properties available on the
result
object from all hooks:fetchError
: if an error occurred during the fetch call it will be available herehttpError
: if a http error occurred it will be available heregraphQLErrors
: The array of GraphQL errors from the server responseerror
: Boolean set to true if any of the above errors have been setcacheHit
: Boolean set to true if the result came from the cache, useful for debugging
operationName
can now be set:useQuery(query, { variables: {...}, operationName: 'MyOperation' })
useMutation(mutation, { variables: {...}, operationName: 'MyOperation' })
const [myMutation] = useMutation(mutation); myMutation({ variables: {}, operationName: 'MyOperation' })