Skip to content

Releases: nearform/graphql-hooks

v3.2.1

28 Feb 14:44
Compare
Choose a tag to compare
  • fix: Preserve state if updateData is passed to useClientRequest. (#76) 4bf9e73

v3.2.0...v3.2.1

v3.2.0

28 Feb 10:56
Compare
Choose a tag to compare
  • 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.2.0

V3.1.1

27 Feb 11:56
Compare
Choose a tag to compare

Pull Requests

  • #55 devDeps update
  • #56 Add react-hooks-testing-library
  • #57 README.md bundle size update
  • #58 Pagination documentation update
  • #59 Issue and PR templates
  • #61 Fixes #37 and #60 & Integration tests
  • #62 Update contributors

Commit comparison v3.1.0...v3.1.1

v3.1.0

25 Feb 14:34
Compare
Choose a tag to compare

Pull requests

  • #47 Integrate all-contributors
  • #44 Pagination

v3.0.0

22 Feb 10:07
Compare
Choose a tag to compare

Pull requests

  • #46 Update react monorepo to v16.8.3
  • #39 Fix initial loading state with useMutation and add optmization

Breaking changes

  • loading is now set to false on first render when using useMutation

v2.0.4

20 Feb 13:31
Compare
Choose a tag to compare

Pull Requests

  • #30, #32: unit tests for useClientRequest
  • #33: Unit tests for useManualQuery
  • #34: Unit tests for useMutation
  • #36 Trigger another request if the variables or query change

v2.0.3

19 Feb 13:32
Compare
Choose a tag to compare

Pull Requests

  • #23: Update devDeps
  • #24: Unit tests for useQuery
  • #25: Fixes #21 - preset useCache=true for useManualQuery

v2.0.2

18 Feb 17:29
Compare
Choose a tag to compare

Pull Requests

  • #22 - Remove graphql-request from deps

v2.0.1

18 Feb 16:36
Compare
Choose a tag to compare

Issues Fixed:

  • #17 - Add CONTRIBUTING.md
  • #18 - Add CODE_OF_CONDUCT.md
  • #10 - API Docs

Pull Requests:

  • #19 - CoC, Contributing docs, editorconfig and bundle badge
  • #15 - unit tests for GraphQLClient
  • #14 - API Docs
  • #16 - NPM version badge to README.md

v2.0.0

15 Feb 12:28
Compare
Choose a tag to compare

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 true
    • onError: 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 here
    • httpError: if a http error occurred it will be available here
    • graphQLErrors: The array of GraphQL errors from the server response
    • error: Boolean set to true if any of the above errors have been set
    • cacheHit: 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' })