Skip to content

Releases: labd/node-graphql-fetcher

v1.3.0

12 Aug 14:37
Compare
Choose a tag to compare

Minor Changes

  • 27e253b: Skip persisted queries for server-side mutations

v1.2.0

06 Aug 13:53
Compare
Choose a tag to compare

Minor Changes

  • 549714b: Support passing extra HTTP headers to client fetcher

v1.1.0

22 Jul 08:42
Compare
Choose a tag to compare

Minor Changes

  • e32ea87: Added request timeout with support for custom signals for request cancelling

v1.0.1

22 Apr 13:53
3c2b811
Compare
Choose a tag to compare

Patch Changes

  • b14681d: add correct cache property

v1.0.0

25 Mar 07:57
Compare
Choose a tag to compare

Major Changes

  • 13f885c: Major API update

    Background

    Current versions had some inconsistencies in the API and a few bugs related to persisted queries if they would fail.
    They would also trigger a lot of Next.js errors during development as we force both revalidate to 0 and cache to no-cache.

    To make error usage more consistent we'll just throw if fetching fails or parsing of JSON fails. Any other errors (like GraphQL body errors) need to be handled by the consumer package.
    There are also no longer any event hooks available as the only one current in use (beforeRequest) could just as well be run before calling the fetcher.

    Breaking changes

    • initServerFetcher() options disableCache has been renamed to dangerouslyDisableCache because it can be dangerous when enabled in production
    • Server fetcher params now use a single object for cache and next options instead of positional arguments
      • e.g. { cache: "force-cache", next: { revalidate: 900 }}
    • Server fetcher default fetch cache option has been changed ("force-cache" -> "default")
    • Server fetcher with dangerouslyDisableCache will now set cache: "no-store" and remove the revalidate key from the next object as to not trigger warnings and errors in Next.js
    • Client fetcher option has been renamed (persisted -> persistedQueries)
    • Client fetcher option onBeforeRequest has been removed, package consumers will have to run their own function before starting the fetch

v0.3.1

18 Dec 16:20
1fec8e1
Compare
Choose a tag to compare

Patch Changes

  • f4c2e08: Don't handle graphql errors

v0.3.0

17 Dec 08:08
Compare
Choose a tag to compare

Minor Changes

  • 5090d2a: Add opentelemetry support for server fetcher

v0.2.0

26 Nov 20:45
Compare
Choose a tag to compare

Minor Changes

  • 171ad72: Fix APQ and only use it for queries (not mutations)
  • 1ac8ef4: Rename package to @labdigital/graphql-fetcher

Patch Changes

  • b59f448: Export the ClientFetcher type

v0.1.2

23 Nov 19:06
Compare
Choose a tag to compare

Patch Changes

  • 46e0779: Add option to disable cache in server fetcher. This can be set when NODE_ENV === development

v0.1.1

23 Nov 07:10
Compare
Choose a tag to compare

Patch Changes

  • de89891: Make cache parameter optional for server client