PackageTrack

npm · #3808

@urql/core

6.0.3urql-graphql/urql

The shared core for the highly customizable and versatile GraphQL client

Release timeline

283 releases since 2020
2020202120222023202420252026

Releases

  1. 6.0.322 Jun 2026
    Release notes

    Patch Changes

    • Drop internal type switch between graphql and @0no-co/graphql.web's types, since the latter now does this already automatically Submitted by @kitten (See #3893)
    Open source →
    Release notes

    Patch Changes

    • Publish with npm provenance Submitted by @kitten (See #3180)
    Open source →
    Release notes

    @urql/[email protected] Latest

    Latest

    Compare

    Choose a tag to compare

    Open source →
  2. 6.0.215 Jun 2026
    Release notes

    Patch Changes

    • Prevent reusal of incoming API data in Graphcache’s produced (“owned”) data. This prevents us from copying the __typename and other superfluous fields Submitted by @kitten (See #3165)
    • ⚠️ Fix regression which caused @defer directives from becoming “sticky” and causing every subsequent cache read to be treated as if the field was deferred Submitted by @kitten (See #3167)
    • Apply hasNext: true and fallthrough logic to cached queries that contain deferred, uncached fields. Deferred query results will now be fetched against the API correctly, even if prior requests have been incomplete Submitted by @kitten (See #3163)
    • ⚠️ Fix offlineExchange duplicating offline mutations in failed queue Submitted by @kitten (See #3158)
    Open source →
    Release notes

    Patch Changes

    • Prevent mapExchange from forwarding async-mapped operations after their teardown has already been received Submitted by @JoviDeCroock (See #3879)
    • Unwrap the payload property in makeResult so that the first incremental/multipart response is parsed correctly. Previously, transports that wrap each result in a payload property (e.g. Apollo Federation's multipart subscriptions) would have their first response dropped as "No Content", while subsequent responses were handled correctly by mergeResultPatch Submitted by @JoviDeCroock (See #3881)
    • Emit terminal subscription results before ending completed subscriptions, preventing teardown races from dropping GraphQL errors Submitted by @JoviDeCroock (See #3885)
    • Remove the invalid exports field from the generated subpath package.json files (e.g. @urql/exchange-graphcache/extras, @urql/exchange-graphcache/default-storage, @urql/core/internal, @urql/next/rsc). These targets pointed at the parent dist/ directory (../dist/...), which violates the Node.js package-exports spec requirement that every exports target begin with ./. Metro (Expo 53 / React Native 0.79) validates this and logged a warning for every affected package. Subpath resolution continues to work: exports-aware bundlers resolve through the root package.json, while legacy resolution relies on the main/module/types fields that remain in place Submitted by @JoviDeCroock (See #3886)
    Open source →
    Release notes

    @urql/[email protected]

    Compare

    Choose a tag to compare

    Open source →
  3. 6.0.111 Aug 2025
    Release notes

    Patch Changes

    • Use nullish coalescing for preferGetMethod and preferGetForPersistedQueries so that false is kept if set Submitted by @dargmuesli (See #3812)
    Open source →
    Release notes

    Patch Changes

    • Remove inclusion and usage of optional chaining operator Submitted by @kitten (See #3116)
    Open source →
  4. 6.0.1-canary-cddc86dd6b17faed7fd5c91ccb4b49aa2acdd91e11 Aug 2025pre-release

    Nothing published for this version

  5. 6.0.09 Aug 2025
    Release notes

    Major Changes

    • Remove dependence on graphql package and replace it with @0no-co/graphql.web, which reduces the default bundlesize impact of urql packages to a minimum. All types should remain compatible, even if you use graphql elsewhere in your app, and if other dependencies are using graphql you may alias it to graphql-web-lite Submitted by @kitten (See #3097)
    • Update OperationResult.hasNext and OperationResult.stale to be required fields. If you have a custom exchange creating results, you'll have to add these fields or use the makeResult, mergeResultPatch, or makeErrorResult helpers Submitted by @kitten (See #3061)

    Minor Changes

    • Update exchanges to drop redundant share calls, since @urql/core’s composeExchanges utility now automatically does so for us Submitted by @kitten (See #3082)

    Patch Changes

    Open source →
  6. 6.0.0-canary-d3b019d51905c1c8b22be9ea1d9fe9ca4335a46c9 Aug 2025pre-release

    Nothing published for this version

  7. 6.0.0-canary-b981b388ee9ed0066399a632aad6b84559f014a69 Aug 2025pre-release

    Nothing published for this version

  8. 6.0.0-canary-b2d8b993af4abb0ffc5c5284b90aca56c527f04529 Jun 2025pre-release

    Nothing published for this version

  9. 5.3.0-canary-b757332b0d05a9a79fea180dbd6e7942d27419a29 Aug 2025pre-release

    Nothing published for this version

  10. 5.3.0-canary-230febcc145a095d1111a82b5993c3e8ab4b490b9 Aug 2025pre-release

    Nothing published for this version

  11. 5.2.029 Jun 2025
    Release notes

    Minor Changes

    Open source →
    Release notes

    Minor Changes

    • Add isOfflineError option to the offlineExchange to allow it to be customized to different conditions to determine whether an operation has failed because of a network error Submitted by @robertherber (See #3020)
    • Allow updates config to react to arbitrary type updates other than just Mutation and Subscription fields. You’ll now be able to write updaters that react to any entity field being written to the cache, which allows for more granular invalidations. Note: If you’ve previously used updates.Mutation and updated.Subscription with a custom schema with custom root names, you‘ll get a warning since you’ll have to update your updates config to reflect this. This was a prior implementation mistake! Submitted by @kitten (See #2979)

    Patch Changes

    • ⚠️ Fix regression which caused partial results, whose refetches were blocked by the looping protection, to not have a stale: true flag added to them. This is a regression from https://github.com/urql-graphql/urql/pull/2831 and only applies to cacheExchanges that had the schema option set Submitted by @kitten (See #2999)
    • Add invariant to data layer that prevents cache writes during cache query operations. This prevents cache.writeFragment, cache.updateQuery, and cache.link from being called in resolvers for instance Submitted by @kitten (See #2978)
    • Updated dependencies (See #3007, #2962, #3007, #3015, and #3022)
    Open source →
  12. 5.2.0-canary-b31d5cbfd18c24789f248c2c0494a693a75b06a929 Jun 2025pre-release

    Nothing published for this version

  13. 5.1.227 Jun 2025
    Release notes

    Patch Changes

    Open source →
  14. 5.1.2-canary-92f5c477b6d5de6fa77d6c37aafafff3c306b2933 Apr 2025pre-release

    Nothing published for this version

  15. 5.1.2-canary-53b822bc06e8af454b33cb48e59cb25e15fad2d51 Apr 2025pre-release

    Nothing published for this version

  16. 5.1.2-canary-48f433a4cc61940b94ca49e5735ea56caf3519942 Apr 2025pre-release

    Nothing published for this version

  17. 5.1.13 Mar 2025
    Release notes

    Patch Changes

    • Omit minified files and sourcemaps' sourcesContent in published packages Submitted by @kitten (See #3755)
    Open source →
  18. 5.1.1-canary-573944cea80f766668d3b9d8aa1afd2c50d744a43 Mar 2025pre-release

    Nothing published for this version

  19. 5.1.09 Dec 2024
    Release notes

    Minor Changes

    • Remove addMetadata transform where we'd strip out metadata for production environments, this particularly affects OperationResult.context.metadata.cacheOutcome Submitted by @alpavlove (See #3714)
    Open source →
  20. 5.1.0-canary-07397cf11b4b6a64bf8fff9a8ea2e23b81d830679 Dec 2024pre-release

    Nothing published for this version

  21. 5.0.821 Oct 2024
    Release notes

    Patch Changes

    Open source →
    Release notes

    Patch Changes

    • ⚠️ Fix operation being blocked for looping due to it not cancelling the looping protection when a teardown is received. This bug could be triggered when a shared query operation triggers again and causes a cache miss (e.g. due to an error). The re-execution of the operation would then be blocked as Graphcache considered it a "reexecution loop" rather than a legitimate execution triggered by the UI. (See https://github.com/urql-graphql/urql/pull/2737 for more information), by @kitten (See #2876)
    Open source →
  22. 5.0.8-canary-e452d6f1e21844a19b63cd86e5867cbaeeb7911921 Oct 2024pre-release

    Nothing published for this version

  23. 5.0.719 Oct 2024
    Release notes

    Patch Changes

    • Remove for-of syntax from @urql/core helpers for JSC memory reduction Submitted by @kitten (See #3690)
    Open source →
    Release notes

    Patch Changes

    Open source →
  24. 5.0.7-canary-36a07165f45ab743e8938ee814378199fbc9cf8919 Oct 2024pre-release

    Nothing published for this version

  25. 5.0.612 Aug 2024
    Release notes

    Patch Changes

    • Allow empty error messages when re-hydrating GraphQL errors Submitted by @JoviDeCroock (See #3650)
    Open source →
    Release notes

    Patch Changes

    • Solve issue where partial data could cause loops between related queries, by @JoviDeCroock (See #2831)
    • Add skipping of garbage collection runs when the cache is waiting for optimistic, deferred or other results in layers. This means that we only take an opportunity to run garbage collection after results have settled and are hence decreasing the chance of hogging the event loop when a run isn't needed, by @kitten (See #2862)
    • ⚠️ Fix a deadlock condition in Graphcache's layers, which is caused by subscriptions (or other deferred layers) starting before one-off mutation layers. This causes the mutation to not be completed, which keeps its data preferred above the deferred layer. That in turn means that layers stop squashing, which causes new results to be missing indefinitely, when they overlap, by @kitten (See #2861)
    • Updated dependencies (See #2843, #2847, #2850, and #2846)
    Open source →
  26. 5.0.6-canary-a620d1535 Aug 2024pre-release

    Nothing published for this version

  27. 5.0.529 Jul 2024
    Release notes

    Patch Changes

    • Removes double serialization of data in ssrExchange Submitted by @negezor (See #3632)
    Open source →
    Release notes

    Patch Changes

    Open source →
  28. 5.0.5-canary-c73d0e2a29 Jul 2024pre-release

    Nothing published for this version

  29. 5.0.46 Jun 2024
    Release notes

    Patch Changes

    • Change how we calculate the OperationKey to take files into account, before we would encode them to null resulting in every mutation with the same variables (excluding the files) to have the same key. This resulted in mutations that upload different files at the same time to share a result in GraphCache Submitted by @JoviDeCroock (See #3601)
    Open source →
    Release notes

    Patch Changes

    • Ensure we aren't eagerly removing layers that are caused by subscriptions, by @JoviDeCroock (See #2771)
    Open source →
  30. 5.0.4-canary-ff1fd76a5 Jun 2024pre-release

    Nothing published for this version

  31. 5.0.4-canary-d07602d26 Jun 2024pre-release

    Nothing published for this version

  32. 5.0.4-canary-bf01d6b45 Jun 2024pre-release

    Nothing published for this version

  33. 5.0.4-canary-befdf48d6 Jun 2024pre-release

    Nothing published for this version

  34. 5.0.31 May 2024
    Release notes

    Patch Changes

    • Use documentId from persisted documents for document keys, when it's available Submitted by @kitten (See #3575)
    Open source →
    Release notes

    Patch Changes

    • ⚠️ Fix case where a mutation would also be counted in the loop-protection, this prevented partial queries from initiating refetches, by @JoviDeCroock (See #2761)
    • Updated dependencies (See #2758 and #2762)
    Open source →
  35. 5.0.224 Apr 2024
    Release notes

    Patch Changes

    • ⚠️ Fix issue where a reexecute on an in-flight operation would lead to multiple network-requests. For example, this issue presents itself when Graphcache is concurrently updating multiple, inter-dependent queries with shared entities. One query completing while others are still in-flight may lead to duplicate operations being issued Submitted by @JoviDeCroock (See #3573)
    Open source →
    Release notes

    Patch Changes

    • Preserve the original DocumentNode AST when updating the cache, to prevent results after a network request from differing and breaking referential equality due to added __typename fields, by @kitten (See #2736)
    • ⚠️ Fix optimistic mutations containing partial results (undefined fields), which previously actually caused a hidden cache miss, which may then affect a subsequent non-optimistic mutation result, by @kitten (See #2740)
    • Prevent cache misses from causing infinite network requests from being issued, when two operations manipulate each other while experiencing cache misses or are partially uncacheable, by @kitten (See #2737)
    • ⚠️ Fix operation identities preventing users from deeply cloning operation contexts. Instead, we now use a client-wide counter (rolling over as needed). While this changes an internal data structure in @urql/core only, this change also affects the offlineExchange in @urql/exchange-graphcache due to it relying on the identity being previously an object rather than an integer, by @kitten (See #2732)
    • ⚠️ Fix referential equality preservation in Graphcache failing after API results, due to a typo writing the API result rather than the updated cache result, by @kitten (See #2741)
    • Updated dependencies (See #2691, #2692, and #2732)
    Open source →
  36. 5.0.2-canary-0f3c5c0124 Apr 2024pre-release

    Nothing published for this version

  37. 5.0.118 Apr 2024
    Release notes

    Patch Changes

    • Use nullish coalescing for preferGetMethod and preferGetForPersistedQueries so that false is kept if set Submitted by @dargmuesli (See #3812)
    • Updated dependencies (See #3812)
    Open source →
    Release notes

    Patch Changes

    • ⚠️ Fix @ts-ignore on TypeScript peer dependency import in typings not being applied due to a leading ! character Submitted by @kitten (See #3567)
    Open source →
    Release notes

    Patch Changes

    • Adjust timing of when an introspected schema will be processed into field maps, interface maps, and union type maps. By making this lazy we can avoid excessive work when these maps aren't actually ever used, by @kitten (See #2640)
    Open source →
  38. 5.0.1-canary-1805b92018 Apr 2024pre-release

    Nothing published for this version

  39. 5.0.02 Apr 2024
    Release notes

    Major Changes

    • Goodbye IE11! 👋 This major release removes support for IE11. All code that is shipped will be transpiled much less and will not be ES5-compatible anymore, by @kitten (See #2504)
    • Prevent cache-hydration from buffering operations, by @JoviDeCroock (See #2612)
    • Implement stricter variables types, which require variables to always be passed and match TypeScript types when the generic is set or inferred. This is a breaking change for TypeScript users potentially, unless all types are adhered to, by @kitten (See #2607)
    • Upgrade to Wonka v6 (wonka@^6.0.0), which has no breaking changes but is built to target ES2015 and comes with other minor improvements. The library has fully been migrated to TypeScript which will hopefully help with making contributions easier!, by @kitten (See #2504)

    Minor Changes

    • Remove the babel-plugin-modular-graphql helper, this because the graphql package hasn't converted to ESM yet which gives issues in node environments, by @JoviDeCroock (See #2551)
    • Allow passing in fragmentName for write and read operations, by @JoviDeCroock (See #2609)

    Patch Changes

    • Graphcache's optimistic option now accepts optimistic mutation resolvers that return fields by name rather than alias. Previously, depending on which mutation was run, the optimistic resolvers would read your optimistic data by field alias (i.e. "alias" for alias: id rather than "id"). Instead, optimistic updates now correctly use field names and allow you to also pass resolvers as values on your optimistic config, by @JoviDeCroock (See #2616)
    • Updated dependencies (See #2551, #2504, #2619, #2607, and #2504)
    Open source →
    Release notes

    Major Changes

    Patch Changes

    • Upgrade @0no-co/graphql.web to 1.0.5 Submitted by @kitten (See #3553)
    Open source →
  40. 5.0.0-canary-fe47189d2 Apr 2024pre-release

    Nothing published for this version

  41. 5.0.0-canary-be9c72ab16 Mar 2024pre-release

    Nothing published for this version

  42. 5.0.0-canary-a938b34227 Mar 2024pre-release

    Nothing published for this version

  43. 5.0.0-canary-a6f516282 Apr 2024pre-release

    Nothing published for this version

  44. 5.0.0-canary-9405b3d82 Apr 2024pre-release

    Nothing published for this version

  45. 5.0.0-canary-6bd4c90f2 Apr 2024pre-release

    Nothing published for this version

  46. 5.0.0-canary-564929ef28 Mar 2024pre-release

    Nothing published for this version

  47. 5.0.0-canary-431b64b422 Mar 2024pre-release

    Nothing published for this version

  48. 5.0.0-canary-3692842e26 Mar 2024pre-release

    Nothing published for this version

  49. 4.3.03 Mar 2024
    Release notes

    Minor Changes

    • Mark @urql/core as a peer dependency as well as a regular dependency Submitted by @kitten (See #3579)
    Open source →
    Release notes

    Minor Changes

    • Support Apollo Federation's format for subscription results in multipart/mixed responses (result properties essentially are namespaced on a payload key) Submitted by @JoviDeCroock (See #3499)
    • Add support for sending persisted documents. Any DocumentNode with no/empty definitions and a documentId property is considered a persisted document. When this is detected a documentId parameter rather than a query string is sent to the GraphQL API, similar to Automatic Persisted Queries (APQs). However, APQs are only supported via @urql/exchange-persisted, while support for documentId is now built-in Submitted by @kitten (See #3515)

    Patch Changes

    • Allow url to be a plain, non-URL pathname (i.e. /api/graphql) to be used with preferGetMethod Submitted by @akrantz01 (See #3514)
    • Correctly support the Headers class being used in fetchOptions Submitted by @JoviDeCroock (See #3505)
    Open source →
  50. 4.3.0-canary-eb1286c72 Mar 2024pre-release

    Nothing published for this version

  51. 4.3.0-canary-e9b476b62 Mar 2024pre-release

    Nothing published for this version

  52. 4.3.0-canary-e8e16bba2 Mar 2024pre-release

    Nothing published for this version

  53. 4.3.0-canary-ceeb73bb2 Mar 2024pre-release

    Nothing published for this version

  54. 4.3.0-canary-973da7ff2 Mar 2024pre-release

    Nothing published for this version

  55. 4.3.0-canary-969935c62 Mar 2024pre-release

    Nothing published for this version

  56. 4.3.0-canary-614c73262 Mar 2024pre-release

    Nothing published for this version

  57. 4.3.0-canary-56c1544b2 Mar 2024pre-release

    Nothing published for this version

  58. 4.3.0-canary-492af0872 Mar 2024pre-release

    Nothing published for this version

  59. 4.2.4-canary-dc509cc210 Feb 2024pre-release

    Nothing published for this version

  60. 4.2.317 Jan 2024
    Release notes

    Patch Changes

    Open source →
    Release notes

    Patch Changes

    • Add back our cache-outcome on the document-cache, this was behind a development flag however in our normalized cache we always add it already Submitted by @JoviDeCroock (See #3464)
    Open source →