PackageTrack

npm · #4032

@apollo/client

4.2.12apollographql/apollo-client

A fully-featured caching GraphQL client.

Release timeline

723 releases since 2019
2020202120222023202420252026

Releases

  1. 3.7.102 Mar 2023
    Release notes3 sources agree

    Patch Changes

    • #9438 52a9c8ea1 Thanks @dciesielkiewicz! - Ensure the client option passed to useMutation's execute function is used when provided. Previously this option was ignored.

    • #9124 975b923c0 Thanks @andrebrantom! - Make ApolloClient.writeQuery and ApolloClient.writeFragment behave more like cache.writeQuery and cache.writeFragment by returning the reference returned by the cache.

    Open source →
  2. 3.7.917 Feb 2023
    Release notes3 sources agree

    Patch Changes

    • #10560 a561ecf43 Thanks @benjamn! - Keep __typename fragment when it does not contain @client directive and strip out inline fragments which use a @client directive. Thanks @Gazler and @mtsmfm!

    • #10560 251a12806 Thanks @benjamn! - Refactor removeDirectivesFromDocument to fix AST ordering sensitivities and avoid 1/3 AST traversals, potentially improving performance for large queries

    Open source →
  3. 3.7.815 Feb 2023
    Release notes3 sources agree

    Patch Changes

    • #7555 45562d6fa Thanks @TheCeloReis! - Adds TVariables generic to GraphQLRequest and MockedResponse interfaces.

    • #10526 1d13de4f1 Thanks @benjamn! - Tolerate undefined concast.sources if complete called earlier than concast.start

    • #10497 8a883d8a1 Thanks @nevir! - Update SingleExecutionResult and IncrementalPayload's data types such that they no longer include undefined, which was not a valid runtime value, to fix errors when TypeScript's exactOptionalPropertyTypes is enabled.

    Open source →
  4. 3.7.73 Feb 2023
    Release notes3 sources agree

    Patch Changes

    • #10502 315faf9ca Thanks @jerelmiller! - Log a warning to the console when a mock passed to MockedProvider or MockLink cannot be matched to a query during a test. This makes it easier to debug user errors in the mock setup, such as typos, especially if the query under test is using an errorPolicy set to ignore, which makes it difficult to know that a match did not occur.

    • #10499 9e54f5dfa Thanks @phryneas! - Allow the execution function returned by useLazyQuery to change the query.

    • #10362 14a56b105 Thanks @mccraveiro! - Fix error when server returns an error and we are also querying for a local field

    Open source →
  5. 3.7.631 Jan 2023
    Release notes3 sources agree

    Patch Changes

    • #10470 47435e879 Thanks @alessbell! - Bumps TypeScript to 4.9.4 (previously 4.7.4) and updates types to account for changes in TypeScript 4.8 by propagating contstraints on generic types. Technically this makes some types stricter as attempting to pass null|undefined into certain functions is now disallowed by TypeScript, but these were never expected runtime values in the first place. This should only affect you if you are wrapping functions provided by Apollo Client with your own abstractions that pass in their generics as type arguments, in which case you might get an error like error TS2344: Type 'YourGenericType' does not satisfy the constraint 'OperationVariables'. In that case, make sure that YourGenericType is restricted to a type that only accepts objects via extends, like Record<string, any> or @apollo/client's OperationVariables:
    import {
      QueryHookOptions,
      QueryResult,
      useQuery,
    + OperationVariables,
    } from '@apollo/client';
    - export function useWrappedQuery<T, TVariables>(
    + export function useWrappedQuery<T, TVariables extends OperationVariables>(
        query: DocumentNode,
        queryOptions: QueryHookOptions<T, TVariables>
      ): QueryResult<T, TVariables> {
        const [execute, result] = useQuery<T, TVariables>(query);
      }
    
    • #10408 55ffafc58 Thanks @zlrlo! - fix: modify BatchHttpLink to have a separate timer for each different batch key

    • #9573 4a4f48dda Thanks @vladar! - Improve performance of local resolvers by only executing selection sets that contain an @client directive. Previously, local resolvers were executed even when the field did not contain @client. While the result was properly discarded, the unncessary work could negatively affect query performance, sometimes signficantly.

    Open source →
  6. 3.7.524 Jan 2023
    Release notes3 sources agree

    Patch Changes

    • #10458 b5ccef229 Thanks @lennyburdette! - Passes getServerSnapshot to useSyncExternalStore so that it doesn't trigger a Missing getServerSnapshot error when using useFragment_experimental on the server.

    • #10471 895ddcb54 Thanks @alessbell! - More robust type definition for headers property passed to createHttpLink

    • #10321 bbaa3ef2d Thanks @alessbell! - Refetch should not return partial data with errorPolicy: none and notifyOnNetworkStatusChange: true.

    • #10402 0b07aa955 Thanks @Hugodby! - Improve context types

    • #10469 328c58f90 Thanks @jerelmiller! - Add generic type defaults when using useFragment to allow passing TData directly to the function without needing to specify TVars.

    Open source →
  7. 3.7.413 Jan 2023
    Release notes3 sources agree

    Patch Changes

    • #10427 28d909cff Thanks @jerelmiller! - Ensure in-flight promises executed by useLazyQuery are rejected when useLazyQuery unmounts.

    • #10383 5c5ca9b01 Thanks @jerelmiller! - Ensure the onError callback is called when the errorPolicy is set to "all" and partial data is returned.

    • #10425 86e35a6d2 Thanks @jerelmiller! - Prefer the onError and onCompleted callback functions passed to the execute function returned from useMutation instead of calling both callback handlers.

    Open source →
  8. 3.7.315 Dec 2022
    Release notes3 sources agree

    Patch Changes

    • #10334 7d923939d Thanks @jerelmiller! - Better handle deferred queries that have cached or partial cached data for them

    • #10368 46b58e976 Thanks @alessbell! - Fix: unblocks support for defer in mutations

      If the @defer directive is present in the document passed to mutate, the Promise will resolve with the final merged data after the last multipart chunk has arrived in the response.

    Open source →
  9. 3.7.26 Dec 2022
    Release notes

    Improvements (from CHANGELOG.md)

    • Only show dev tools suggestion in the console when connectToDevTools is true. @chris110408 in #10258

    • Pass TCache generic to MutationHookOptions for better type support in useMutation. @igrlk in #10223

    • Add name property to ApolloError to ensure better type safety and help error reporting tools better identify the error. @aaronadamsCA in #9323

    • Export a ModifierDetails type for the details parameter of a Modifier function. @KeithGillette in #7133

    • Revert use of cloneDeep to clone options when fetching queries. @MrDoomBringer in #10215

    What's Changed (auto-generated by GitHub)

    • Add connect to dev tools check by @chris110408 in https://github.com/apollographql/apollo-client/pull/10258
    • Update the CHANGELOG by @jerelmiller in https://github.com/apollographql/apollo-client/pull/10260
    • Revert cloneDeep-ing request headers by @MrDoomBringer in https://github.com/apollographql/apollo-client/pull/10215
    • chore(tests): warn on ts-jest diagnostics error outside of CI test runs by @alessbell in https://github.com/apollographql/apollo-client/pull/10268
    • updates roadmap nov 2022 by @jpvajda in https://github.com/apollographql/apollo-client/pull/10269
    • docs: displays the error correctly by @ctesniere in https://github.com/apollographql/apollo-client/pull/10275
    • Update the CHANGELOG with changes from #10275 by @bignimbus in https://github.com/apollographql/apollo-client/pull/10276
    • Fix 'broken' links by @StephenBarlow in https://github.com/apollographql/apollo-client/pull/10288
    • Additional documentation for managing local state by @bignimbus in https://github.com/apollographql/apollo-client/pull/10282
    • chore(docs): remove graphql-anywhere from apollo-link-rest doc by @alessbell in https://github.com/apollographql/apollo-client/pull/10232
    • doc(static-typing): rewrite with GraphQL Code Generator setup by @charlypoly in https://github.com/apollographql/apollo-client/pull/10173
    • Further update the TypeGen article for style by @rkoron007 in https://github.com/apollographql/apollo-client/pull/10294
    • Pass TCache generic to MutationHookOptions by @igrlk in https://github.com/apollographql/apollo-client/pull/10223
    • Add name property to ApolloError by @aaronadamsCA in https://github.com/apollographql/apollo-client/pull/9323
    • Add array examples to reactive variable documentation by @larrymyers in https://github.com/apollographql/apollo-client/pull/10235
    • Update CHANGELOG with changes from #10235 by @bignimbus in https://github.com/apollographql/apollo-client/pull/10302
    • docs: Update subscribeToMore example to use React hooks by @trevorblades in https://github.com/apollographql/apollo-client/pull/10309
    • export separate ModifierUtility type by @KeithGillette in https://github.com/apollographql/apollo-client/pull/7133
    • Changelog and docs for preserveHeaderCase by @MrDoomBringer in https://github.com/apollographql/apollo-client/pull/10111

    New Contributors

    • @chris110408 made their first contribution in https://github.com/apollographql/apollo-client/pull/10258
    • @ctesniere made their first contribution in https://github.com/apollographql/apollo-client/pull/10275
    • @charlypoly made their first contribution in https://github.com/apollographql/apollo-client/pull/10173
    • @igrlk made their first contribution in https://github.com/apollographql/apollo-client/pull/10223
    • @aaronadamsCA made their first contribution in https://github.com/apollographql/apollo-client/pull/9323
    • @larrymyers made their first contribution in https://github.com/apollographql/apollo-client/pull/10235
    • @KeithGillette made their first contribution in https://github.com/apollographql/apollo-client/pull/7133

    Full Changelog: https://github.com/apollographql/apollo-client/compare/v3.7.1...v3.7.2

    Open source →
    Additional notes2 sources agree

    Patch Changes

    • Only show dev tools suggestion in the console when connectToDevTools is true. <br/> @chris110408 in #10258

    • Pass TCache generic to MutationHookOptions for better type support in useMutation. <br /> @igrlk in #10223

    • Add name property to ApolloError to ensure better type safety and help error reporting tools better identify the error. <br /> @aaronadamsCA in #9323

    • Export a ModifierDetails type for the details parameter of a Modifier function. <br /> @KeithGillette in #7133

    • Revert use of cloneDeep to clone options when fetching queries. <br /> @MrDoomBringer in #10215

    Open source →
  10. 3.7.120 Oct 2022
    Release notes

    Bug fixes (from CHANGELOG.md)

    • Fix issue where loading remains true after observer.refetch is called repeatedly with different variables when the same data are returned. @alessbell in #10143

    • Fix race condition where useFragment_experimental could receive cache updates before initially calling cache.watch in useEffect. @benjamn in #10212

    What's Changed (auto-generated by GitHub)

    • changes install message by @jpvajda in https://github.com/apollographql/apollo-client/pull/10149
    • oct 2022 roadmap update by @jpvajda in https://github.com/apollographql/apollo-client/pull/10161
    • Small updates for AS4 by @rkoron007 in https://github.com/apollographql/apollo-client/pull/10175
    • Various edits to caching docs by @StephenBarlow in https://github.com/apollographql/apollo-client/pull/9984
    • Use nav nesting and tweak defer article slightly by @StephenBarlow in https://github.com/apollographql/apollo-client/pull/10187
    • Call iterateObserversSafely if vars change between calls to observer.next by @alessbell in https://github.com/apollographql/apollo-client/pull/10143
    • Update docs algolia filters by @trevorblades in https://github.com/apollographql/apollo-client/pull/10200
    • Fix typo in NetworkError by @OliverWales in https://github.com/apollographql/apollo-client/pull/10204
    • Update apollo-link-rest.md - Add graphql-anywhere to install list by @pfcodes in https://github.com/apollographql/apollo-client/pull/10138
    • Use custom config/bundlesize.ts script to avoid iltorb dependency, unbreaking npm install when using Node.js v19 by @benjamn in https://github.com/apollographql/apollo-client/pull/10206
    • Experiment with not caching the ~/.npm directory during Filesize/Tests CircleCI jobs by @benjamn in https://github.com/apollographql/apollo-client/pull/10209
    • docs: add TypedDocumentNode example by @henryqdineen in https://github.com/apollographql/apollo-client/pull/10031
    • Update Local Resolvers docs by @bignimbus in https://github.com/apollographql/apollo-client/pull/10211
    • Remove (deprecated) from Local resolvers doc title by @bignimbus in https://github.com/apollographql/apollo-client/pull/10213
    • Remaining Local Resolvers wordsmithing by @bignimbus in https://github.com/apollographql/apollo-client/pull/10214
    • Call forceUpdate immediately if diff changes between first useFragment call and first cache.watch call by @benjamn in https://github.com/apollographql/apollo-client/pull/10212

    New Contributors (auto-generated by GitHub)

    • @OliverWales made their first contribution in https://github.com/apollographql/apollo-client/pull/10204
    • @pfcodes made their first contribution in https://github.com/apollographql/apollo-client/pull/10138

    Full Changelog: https://github.com/apollographql/apollo-client/compare/v3.7.0...v3.7.1

    Open source →
    Additional notes2 sources agree

    Patch Changes

    • Fix issue where loading remains true after observer.refetch is called repeatedly with different variables when the same data are returned. <br/> @alessbell in #10143

    • Fix race condition where useFragment_experimental could receive cache updates before initially calling cache.watch in useEffect. <br/> @benjamn in #10212

    Open source →
  11. 3.7.030 Sept 2022
    Release notes

    New Features (from CHANGELOG.md)

    • Implement preview support for the @defer directive. @alessbell and @benjamn in #10018

    • Implement useFragment_experimental hook, which represents a lightweight live binding into the ApolloCache, and never triggers network requests of its own. @benjamn in #8782

    • Allow registering named fragments with InMemoryCache to support using ...NamedFragment in queries without redeclaring NamedFragment repeatedly in every query that uses it. @benjamn in #9764

    • Support onError callback for useSubscription hook. @jeroenvisser101 in #9495

    Improvements (from CHANGELOG.md)

    • Delay calling onCompleted and onError callbacks passed to useQuery using Promise.resolve().then(() => ...) to fix issue #9794. @dylanwulf in #9823

    • Replace concast.cleanup method with simpler concast.beforeNext API, which promises to call the given callback function just before the next result/error is delivered. In addition, concast.removeObserver no longer takes a quietly?: boolean parameter, since that parameter was partly responsible for cleanup callbacks sometimes not getting called. @benjamn in #9718

    • Allow preserving header name capitalization when creating an HttpLink with createHttpLink({ uri, preserveHeaderCase: true }). Otherwise, header names are converted to lowercase to prevent case-sensitivity bugs. @MrDoomBringer in #9891

    • Make queries with a pollInterval respect the no-cache fetch policy, instead of writing polled results into the cache. @MrDoomBringer in #10020

    • Deprecate the onSubscriptionData callback in favor of a new onData callback for the useSubscription hook. Deprecate the onSubscriptionComplete callback in favor of a new onComplete callback for the useSubscription hook. @jerelmiller in #10134

    Potentially disruptive (from CHANGELOG.md)

    • The optional subscribeAndCount testing utility exported from @apollo/client/testing/core now takes a single generic TResult type parameter, instead of TData. This type will typically be inferred from the observable argument type, but if you have any explicit calls to subscribeAndCount<TData>(...) in your own codebase, you may need to adjust those calls accordingly. @benjamn in #9718

    What's Changed (auto-generated by GitHub)

    • Replace concast.cleanup method with simpler concast.beforeNext API by @benjamn in https://github.com/apollographql/apollo-client/pull/9718
    • Implement minimal useFragment hook by @benjamn in https://github.com/apollographql/apollo-client/pull/8782
    • Fix BatchHttpLink regression that silently discarded some pending queries by @benjamn in https://github.com/apollographql/apollo-client/pull/9793
    • Delay execution of callback functions to fix React errors by @dylanwulf in https://github.com/apollographql/apollo-client/pull/9801
    • Return most recent result diff from useFragment, update test by @alessbell in https://github.com/apollographql/apollo-client/pull/10030
    • Supports "no-cache" fetchPolicy with pollInterval by @MrDoomBringer in https://github.com/apollographql/apollo-client/pull/10020
    • (Release 3.7) Rename useFragment -> useFragment_experimental by @MrDoomBringer in https://github.com/apollographql/apollo-client/pull/10075
    • Adds @defer support by @alessbell in https://github.com/apollographql/apollo-client/pull/10018
    • Improvements to the hasDirectives utility function by @benjamn in https://github.com/apollographql/apollo-client/pull/10082
    • chore: omit previousResult, lastCompleteResult from options/result by @alessbell in https://github.com/apollographql/apollo-client/pull/10100
    • Support header name capitalization by @MrDoomBringer in https://github.com/apollographql/apollo-client/pull/9891
    • Add onError option to useSubscription hook by @jeroenvisser101 in https://github.com/apollographql/apollo-client/pull/9495
    • Avoid letting defaultDataIdFromObject normalize objects with nullish ids by @benjamn in https://github.com/apollographql/apollo-client/pull/9862
    • Allow registering named fragments with InMemoryCache to support using ...FragmentName in queries without redeclaring FragmentName in every query by @benjamn in https://github.com/apollographql/apollo-client/pull/9764
    • Fix various flaky tests before publishing @apollo/[email protected] by @benjamn in https://github.com/apollographql/apollo-client/pull/10118
    • Update handler names for useSubscription hook by @jerelmiller in https://github.com/apollographql/apollo-client/pull/10134
    • Add changes from #10134 to CHANGELOG.md by @jerelmiller in https://github.com/apollographql/apollo-client/pull/10148
    • Release 3.7.0 by @benjamn in https://github.com/apollographql/apollo-client/pull/9633

    New Contributors 🎉 🙌 🥳

    • @jeroenvisser101 made their first contribution in https://github.com/apollographql/apollo-client/pull/9495
    • @jerelmiller made their first contribution in https://github.com/apollographql/apollo-client/pull/10134

    Full Changelog: https://github.com/apollographql/apollo-client/compare/v3.6.10...v3.7.0

    Open source →
    Additional notes2 sources agree

    Minor Changes

    • Implement preview support for the @defer directive. <br/> @alessbell and @benjamn in #10018

    • Implement useFragment_experimental hook, which represents a lightweight live binding into the ApolloCache, and never triggers network requests of its own. <br/> @benjamn in #8782

    • Allow registering named fragments with InMemoryCache to support using ...NamedFragment in queries without redeclaring NamedFragment repeatedly in every query that uses it. <br/> @benjamn in #9764

    • Support onError callback for useSubscription hook. <br/> @jeroenvisser101 in #9495

    • Implement preserveHeaderCase option for http context object, enabling preserved header capitalization for non-http-spec-compliant servers. <br/> @mrdoombringer in #9891

    Patch Changes

    • Delay calling onCompleted and onError callbacks passed to useQuery using Promise.resolve().then(() => ...) to fix issue #9794. <br/> @dylanwulf in #9823

    • Replace concast.cleanup method with simpler concast.beforeNext API, which promises to call the given callback function just before the next result/error is delivered. In addition, concast.removeObserver no longer takes a quietly?: boolean parameter, since that parameter was partly responsible for cleanup callbacks sometimes not getting called. <br/> @benjamn in #9718

    • Allow preserving header name capitalization when creating an HttpLink with createHttpLink({ uri, preserveHeaderCase: true }). Otherwise, header names are converted to lowercase to prevent case-sensitivity bugs. <br/> @MrDoomBringer in #9891

    • Make queries with a pollInterval respect the no-cache fetch policy, instead of writing polled results into the cache. <br/> @MrDoomBringer in #10020

    • Deprecate the onSubscriptionData callback in favor of a new onData callback for the useSubscription hook. Deprecate the onSubscriptionComplete callback in favor of a new onComplete callback for the useSubscription hook.<br/> @jerelmiller in #10134

    Potentially disruptive

    • The optional subscribeAndCount testing utility exported from @apollo/client/testing/core now takes a single generic TResult type parameter, instead of TData. This type will typically be inferred from the observable argument type, but if you have any explicit calls to subscribeAndCount<TData>(...) in your own codebase, you may need to adjust those calls accordingly. <br/> @benjamn in #9718
    Open source →
  12. 3.7.0-rc.021 Sept 2022pre-release

    Nothing published for this version

  13. 3.7.0-beta.821 Sept 2022pre-release

    Nothing published for this version

  14. 3.7.0-beta.78 Sept 2022pre-release

    Nothing published for this version

  15. 3.7.0-beta.627 Jun 2022pre-release

    Nothing published for this version

  16. 3.7.0-beta.510 Jun 2022pre-release

    Nothing published for this version

  17. 3.7.0-beta.410 Jun 2022pre-release

    Nothing published for this version

  18. 3.7.0-beta.37 Jun 2022pre-release

    Nothing published for this version

  19. 3.7.0-beta.27 Jun 2022pre-release

    Nothing published for this version

  20. 3.7.0-beta.126 May 2022pre-release

    Nothing published for this version

  21. 3.7.0-beta.025 May 2022pre-release

    Nothing published for this version

  22. 3.7.0-alpha.619 May 2022pre-release

    Nothing published for this version

  23. 3.7.0-alpha.516 May 2022pre-release

    Nothing published for this version

  24. 3.7.0-alpha.413 May 2022pre-release

    Nothing published for this version

  25. 3.7.0-alpha.39 May 2022pre-release

    Nothing published for this version

  26. 3.7.0-alpha.23 May 2022pre-release

    Nothing published for this version

  27. 3.7.0-alpha.13 May 2022pre-release

    Nothing published for this version

  28. 3.7.0-alpha.027 Apr 2022pre-release

    Nothing published for this version

  29. 3.6.1029 Sept 2022
    Release notes

    Improvements (from CHANGELOG.md)

    • The client options (variables, context, etc.) used for mutation calls are now available as the second argument to the onCompleted and onError callback functions. @MrDoomBringer in #10052

    What's Changed

    • adds a prettier ignore file by @jpvajda in https://github.com/apollographql/apollo-client/pull/9809
    • Fix documentation code snippets for SubscriptionClient by @jpikora in https://github.com/apollographql/apollo-client/pull/9820
    • Add a new maintainer (Yours Truly) to README by @MrDoomBringer in https://github.com/apollographql/apollo-client/pull/9863
    • Remove Ignoring errors sections in link and error handling docs. by @alessbell in https://github.com/apollographql/apollo-client/pull/9854
    • Update the getting started guide to use the FlyBy API by @rkoron007 in https://github.com/apollographql/apollo-client/pull/9851
    • Mockprovider docs updates by @jpvajda in https://github.com/apollographql/apollo-client/pull/9867
    • Updates testing docs to use Testing Library by @alessbell in https://github.com/apollographql/apollo-client/pull/9888
    • Clarify that id is optional on queries in cache.modify documentation by @MrDoomBringer in https://github.com/apollographql/apollo-client/pull/9894
    • Add defensive isMounted checks before setting state via useMutation Hook by @alessbell in https://github.com/apollographql/apollo-client/pull/9883
    • Add onQueryUpdate missing parameters by @capucho in https://github.com/apollographql/apollo-client/pull/9898
    • Type policy inheritance by @jpvajda in https://github.com/apollographql/apollo-client/pull/9905
    • Use reactive var hook by @jpvajda in https://github.com/apollographql/apollo-client/pull/9906
    • Remove jest-fetch-mock in favor of fetch-mock, update tests by @alessbell in https://github.com/apollographql/apollo-client/pull/9928
    • Minor edits to new useReactiveVar reference by @StephenBarlow in https://github.com/apollographql/apollo-client/pull/9932
    • Add the new CodeSandbox link by @rkoron007 in https://github.com/apollographql/apollo-client/pull/9945
    • Pin TypeDoc version in Netlify command by @trevorblades in https://github.com/apollographql/apollo-client/pull/9950
    • Fix TypeDoc generated file paths by @trevorblades in https://github.com/apollographql/apollo-client/pull/9951
    • Quick doc change to clarify subscriptions don't work in client schema by @MrDoomBringer in https://github.com/apollographql/apollo-client/pull/9944
    • Run React 17 + 18 tests on CI by @alessbell in https://github.com/apollographql/apollo-client/pull/9942
    • Roadmap update by @jpvajda in https://github.com/apollographql/apollo-client/pull/9966
    • chore: update renovate config and add .npmrc by @alessbell in https://github.com/apollographql/apollo-client/pull/9967
    • chore: update CONTRIBUTING.md by @alessbell in https://github.com/apollographql/apollo-client/pull/9953
    • Field policy merge docs by @jpvajda in https://github.com/apollographql/apollo-client/pull/9969
    • add link to solid.js github repo by @jpvajda in https://github.com/apollographql/apollo-client/pull/9981
    • Replace crypto-hash with a custom hashing function in tests by @hwillson in https://github.com/apollographql/apollo-client/pull/9986
    • adds broadcast false details by @jpvajda in https://github.com/apollographql/apollo-client/pull/9978
    • Use function declaration for WithApolloClient example by @charpeni in https://github.com/apollographql/apollo-client/pull/9977
    • docs: Update code block meta strings to make syntax highlighting work again by @trevorblades in https://github.com/apollographql/apollo-client/pull/9985
    • Fix updateQuery docs having incorrect function signature by @MrDoomBringer in https://github.com/apollographql/apollo-client/pull/10002
    • Correct error handling example in docs by @MrDoomBringer in https://github.com/apollographql/apollo-client/pull/9996
    • updates roadmap by @jpvajda in https://github.com/apollographql/apollo-client/pull/10013
    • adds solid.js to integrations.md by @jpvajda in https://github.com/apollographql/apollo-client/pull/10014
    • docs: fix React default import by @henryqdineen in https://github.com/apollographql/apollo-client/pull/10036
    • docs: remove errant duplicated text by @henryqdineen in https://github.com/apollographql/apollo-client/pull/10046
    • updates local resolver warning by @jpvajda in https://github.com/apollographql/apollo-client/pull/10062
    • GitHub Workflows security hardening by @sashashura in https://github.com/apollographql/apollo-client/pull/10049
    • Pass mutation options to handlers by @MrDoomBringer in https://github.com/apollographql/apollo-client/pull/10052
    • MissingFieldError once again extends Error by @MrDoomBringer in https://github.com/apollographql/apollo-client/pull/10051
    • Fix typos by @CompuWiser in https://github.com/apollographql/apollo-client/pull/10045
    • Documentation update for ApolloQueryResult by @MrDoomBringer in https://github.com/apollographql/apollo-client/pull/10055
    • docs: Update "Using Apollo with TypeScript" with a description of fetchMore and subscribeToMore by @bignimbus in https://github.com/apollographql/apollo-client/pull/10066
    • fix: make react-dom an optional peer dependency by @brillout in https://github.com/apollographql/apollo-client/pull/9933
    • adds defer docs by @jpvajda in https://github.com/apollographql/apollo-client/pull/10079
    • updates defer message by @jpvajda in https://github.com/apollographql/apollo-client/pull/10088
    • Make it clear that @defer is available by installing beta by @hwillson in https://github.com/apollographql/apollo-client/pull/10096
    • Better error message when failing to match mock variables by @zinkkrysty in https://github.com/apollographql/apollo-client/pull/9921
    • Export Modifier and Modifiers by @olyop in https://github.com/apollographql/apollo-client/pull/8973
    • chore(docs): add useFragment_experimental documentation by @alessbell in https://github.com/apollographql/apollo-client/pull/10099
    • Bump up timeout time for batchLink, query and polling tests by @MrDoomBringer in https://github.com/apollographql/apollo-client/pull/10097
    • remove obsolete displayName query option by @henryqdineen in https://github.com/apollographql/apollo-client/pull/10044
    • docs: fixup onResetStore docs, convert to hooks by @henryqdineen in https://github.com/apollographql/apollo-client/pull/10047
    • changes beta to next by @jpvajda in https://github.com/apollographql/apollo-client/pull/10119
    • local-state-management AC2 LocalState side note by @MrDoomBringer in https://github.com/apollographql/apollo-client/pull/10112
    • Fix for ServerError obscured by ServerParseError by @dillontiner in https://github.com/apollographql/apollo-client/pull/9997
    • Remove conditional require()s from SSR by @MrDoomBringer in https://github.com/apollographql/apollo-client/pull/9975
    • chore(docs): use optional chaining rather than non-null assertion by @charpeni in https://github.com/apollographql/apollo-client/pull/10129
    • chore(tests): use node v16.10.0 for jest tests due to memory leaks in 16.11+ by @alessbell in https://github.com/apollographql/apollo-client/pull/10140
    • docs: Fix typo by @Javokhir12 in https://github.com/apollographql/apollo-client/pull/10128

    New Contributors

    • @jpikora made their first contribution in https://github.com/apollographql/apollo-client/pull/9820
    • @capucho made their first contribution in https://github.com/apollographql/apollo-client/pull/9898
    • @charpeni made their first contribution in https://github.com/apollographql/apollo-client/pull/9977
    • @sashashura made their first contribution in https://github.com/apollographql/apollo-client/pull/10049
    • @CompuWiser made their first contribution in https://github.com/apollographql/apollo-client/pull/10045
    • @bignimbus made their first contribution in https://github.com/apollographql/apollo-client/pull/10066
    • @brillout made their first contribution in https://github.com/apollographql/apollo-client/pull/9933
    • @zinkkrysty made their first contribution in https://github.com/apollographql/apollo-client/pull/9921
    • @olyop made their first contribution in https://github.com/apollographql/apollo-client/pull/8973
    • @dillontiner made their first contribution in https://github.com/apollographql/apollo-client/pull/9997
    • @Javokhir12 made their first contribution in https://github.com/apollographql/apollo-client/pull/10128

    Full Changelog: https://github.com/apollographql/apollo-client/compare/v3.6.9...v.3.6.10

    Open source →
    Additional notes2 sources agree

    Improvements

    • The client options (variables, context, etc.) used for mutation calls are now available as the second argument to the onCompleted and onError callback functions. <br/> @MrDoomBringer in #10052
    Open source →
  30. 3.6.921 Jun 2022
    Release notes

    Bug Fixes (from CHANGELOG.md)

    • Leave fetchPolicy unchanged when skip: true (or in standby) and nextFetchPolicy is available, even if variables change. @benjamn in #9823

    What's Changed

    • removes deprecation language by @jpvajda in https://github.com/apollographql/apollo-client/pull/9825
    • Leave fetchPolicy unchanged when skip: true (or in standby) and nextFetchPolicy is available by @benjamn in https://github.com/apollographql/apollo-client/pull/9823

    Full Changelog: https://github.com/apollographql/apollo-client/compare/v3.6.8...v3.6.9

    Open source →
    Additional notes2 sources agree

    Bug Fixes

    • Leave fetchPolicy unchanged when skip: true (or in standby) and nextFetchPolicy is available, even if variables change. <br/> @benjamn in #9823
    Open source →
  31. 3.6.810 Jun 2022
    Release notes

    Bug Fixes (from CHANGELOG.md)

    • Fix incorrect variables passed in FieldFunctionOptions for nested readField calls in read and merge functions. @stardustxx in #9808

    • Improve repository build scripts to work better on Windows. @dylanwulf in #9805

    • Ensure useQuery(query, { skip: true }).called === false rather than always returning called as true. @KucharskiPiotr in #9798

    • Allow abandoned reobserve requests to unsubscribe from their underlying Observable. @javier-garcia-meteologica in #9791

    What's Changed (auto-generated by GitHub)

    • fix: fixes FieldFunctionOptions return incorrect variables by @stardustxx in https://github.com/apollographql/apollo-client/pull/9808
    • Fix build config to work on Windows by @dylanwulf in https://github.com/apollographql/apollo-client/pull/9805
    • Fix: useQuery returns called value based on skip option. by @KucharskiPiotr in https://github.com/apollographql/apollo-client/pull/9798
    • fix: abort stale connection on reobserve (#9532) by @javier-garcia-meteologica in https://github.com/apollographql/apollo-client/pull/9791

    New Contributors 🎉 🙌 🥳

    • @stardustxx made their first PR in https://github.com/apollographql/apollo-client/pull/9808
    • @dylanwulf made their first PR in https://github.com/apollographql/apollo-client/pull/9805
    • @KucharskiPiotr made their first PR in https://github.com/apollographql/apollo-client/pull/9798

    Full Changelog: https://github.com/apollographql/apollo-client/compare/v3.6.7...v3.6.8

    Open source →
    Additional notes2 sources agree

    Bug Fixes

    • Fix incorrect variables passed in FieldFunctionOptions for nested readField calls in read and merge functions. <br/> @stardustxx in #9808

    • Improve repository build scripts to work better on Windows. <br/> @dylanwulf in #9805

    • Ensure useQuery(query, { skip: true }).called === false rather than always returning called as true. <br/> @KucharskiPiotr in #9798

    • Allow abandoned reobserve requests to unsubscribe from their underlying Observable. <br/> @javier-garcia-meteologica in #9791

    Open source →
  32. 3.6.710 Jun 2022
    Release notes

    Bug Fixes (from CHANGELOG.md)

    • Fix regression (introduced in v3.6.0) that caused BatchHttpLink to discard pending batched queries on early completion of the underlying Observable. @benjamn in #9793

    What's Changed (auto-generated by GitHub)

    • fixes pr 9600 by @jpvajda in https://github.com/apollographql/apollo-client/pull/9776
    • Update mutations.mdx by @Gregoirevda in https://github.com/apollographql/apollo-client/pull/9708
    • updates roadmap for june 2022 by @jpvajda in https://github.com/apollographql/apollo-client/pull/9784
    • fixes expansion panel by @jpvajda in https://github.com/apollographql/apollo-client/pull/9777
    • Backport PR #9793 from release-3.7 branch to main by @benjamn in https://github.com/apollographql/apollo-client/pull/9807

    Full Changelog: https://github.com/apollographql/apollo-client/compare/v3.6.6...v3.6.7

    Open source →
    Additional notes2 sources agree

    Bug Fixes

    • Fix regression (introduced in v3.6.0) that caused BatchHttpLink to discard pending batched queries on early completion of the underlying Observable. <br/> @benjamn in #9793
    Open source →
  33. 3.6.626 May 2022
    Release notes

    What's Changed (auto-generated by GitHub)

    • Allow useLazyQuery(query, { defaultOptions }) to benefit from defaultOptions.variables by @benjamn in https://github.com/apollographql/apollo-client/pull/9762

    Full Changelog: https://github.com/apollographql/apollo-client/compare/v3.6.5...v3.6.6

    Open source →
    Additional notes2 sources agree

    Bug Fixes

    • Allow useLazyQuery(query, { defaultOptions }) to benefit from defaultOptions.variables and client.defaultOptions.watchQuery.variables merging. <br/> @benjamn in #9762
    Open source →
  34. 3.6.523 May 2022
    Release notes

    Bug Fixes (from CHANGELOG.md)

    • Restore pre-v3.6 variables replacement behavior of ObservableQuery#reobserve method, fixing a regression that prevented removal of variables. @benjamn in #9741

    • Preserve previousData even when different query or client provided to useQuery, instead of resetting previousData to undefined in those cases, matching behavior prior to v3.6.0. @benjamn in #9734

    • Fix bug where onCompleted() and onError() are stale for useMutation(). @charle692 in #9740

    • Limit scope of DeepMerger object reuse, and avoid using Object.isFrozen, which can introduce differences between development and production if objects that were frozen using Object.freeze in development are left unfrozen in production. @benjamn in #9742

    • Properly merge variables from original useLazyQuery(query, { variables }) with variables passed to execution function. @benjamn in #9758

    What's Changed (auto-generated by GitHub)

    • Preserve previousData even when different client or query passed to useQuery by @benjamn in https://github.com/apollographql/apollo-client/pull/9734
    • Restore pre-v3.6 variables replacement behavior of ObservableQuery#reobserve method by @benjamn in https://github.com/apollographql/apollo-client/pull/9741
    • Clarify modifying response data in link docs by @hatched-kade in https://github.com/apollographql/apollo-client/pull/9430
    • adds documentation on file uploads by @jpvajda in https://github.com/apollographql/apollo-client/pull/9744
    • Fix improper syntax with spread operator by @mongodben in https://github.com/apollographql/apollo-client/pull/9441
    • Reduce confusion about the query component by @jpvajda in https://github.com/apollographql/apollo-client/pull/9747
    • Fix bug where onCompleted and onError are stale for useMutation. onCompleted and onError could not be changed while a mutation is executing. by @charle692 in https://github.com/apollographql/apollo-client/pull/9740
    • Restrict DeepMerger mutable object reuse to fix subtle production-only bug by @benjamn in https://github.com/apollographql/apollo-client/pull/9742
    • Merge variables from original useLazyQuery(query, { variables }) with variables passed to execution function by @benjamn in https://github.com/apollographql/apollo-client/pull/9758

    New Contributors

    • @hatched-kade made their first contribution in https://github.com/apollographql/apollo-client/pull/9430
    • @mongodben made their first contribution in https://github.com/apollographql/apollo-client/pull/9441
    • @charle692 made their first contribution in https://github.com/apollographql/apollo-client/pull/9740

    Full Changelog: https://github.com/apollographql/apollo-client/compare/v3.6.4...v3.6.5

    Open source →
    Additional notes2 sources agree

    Bug Fixes

    • Restore pre-v3.6 variables replacement behavior of ObservableQuery#reobserve method, fixing a regression that prevented removal of variables. <br/> @benjamn in #9741

    • Preserve previousData even when different query or client provided to useQuery, instead of resetting previousData to undefined in those cases, matching behavior prior to v3.6.0. <br/> @benjamn in #9734

    • Fix bug where onCompleted() and onError() are stale for useMutation(). <br/> @charle692 in #9740

    • Limit scope of DeepMerger object reuse, and avoid using Object.isFrozen, which can introduce differences between development and production if objects that were frozen using Object.freeze in development are left unfrozen in production. <br/> @benjamn in #9742

    • Properly merge variables from original useLazyQuery(query, { variables }) with variables passed to execution function. <br/> @benjamn in #9758

    Open source →
  35. 3.6.416 May 2022
    Release notes

    Bug Fixes (from CHANGELOG.md)

    • Guarantee Concast cleanup without Observable cancelled prematurely rejection, potentially solving long-standing issues involving that error. @benjamn in #9701

    • Ensure useSubscription subscriptions are properly restarted after unmounting/remounting by React 18 in <StrictMode>. @kazekyo in #9707

    Improvements (from CHANGELOG.md)

    • Internalize useSyncExternalStore shim, for more control than use-sync-external-store provides, fixing some React Native issues. @benjamn in #9675 and #9709

    • Provide @apollo/client/**/*.cjs.native.js versions of every @apollo/client/**/*.cjs bundle (including dependencies ts-invariant and zen-observable-ts) to help React Native's Metro bundler automatically resolve CommonJS entry point modules. These changes should render unnecessary the advice we gave in the v3.5.4 section below about metro.config.js. @benjamn in #9716

    • Handle falsy incoming data more gracefully in offetLimitPagination().merge function. @shobhitsharma in #9705

    What's Changed (auto-generated by GitHub)

    • Poll interval docs update by @jpvajda in https://github.com/apollographql/apollo-client/pull/9687
    • [docs] Fix markdown bug in rest link by @ryanrhee in https://github.com/apollographql/apollo-client/pull/9698
    • Internalize useSyncExternalStore shim, for more control than use-sync-external-store provides by @benjamn in https://github.com/apollographql/apollo-client/pull/9675
    • Guarantee Concast cleanup without Observable cancelled prematurely rejection by @benjamn in https://github.com/apollographql/apollo-client/pull/9701
    • docs: fix code snippet by @santiph in https://github.com/apollographql/apollo-client/pull/9703
    • Update example headers with authentication by @theill in https://github.com/apollographql/apollo-client/pull/9621
    • Fix a misplaced semicolon by @mlocher in https://github.com/apollographql/apollo-client/pull/9498
    • Correct GraphQL variable name "text" to "type" by @FumioNonaka-ksj in https://github.com/apollographql/apollo-client/pull/9529
    • Add apollo-multi-endpoint-link to community links by @jean9696 in https://github.com/apollographql/apollo-client/pull/9301
    • readQuery clarification by @avinoamsn in https://github.com/apollographql/apollo-client/pull/9195
    • Update authentication.mdx by @volokolamskspb in https://github.com/apollographql/apollo-client/pull/8630
    • Add apollo-link-observable to community links by @dragozin in https://github.com/apollographql/apollo-client/pull/8234
    • apollo-codegen is deprecated, but the tooling documentation still suggests it by @krainboltgreene in https://github.com/apollographql/apollo-client/pull/7517
    • chore: corrected body params by @jpvajda in https://github.com/apollographql/apollo-client/pull/9711
    • useSyncExternalStore refinements by @benjamn in https://github.com/apollographql/apollo-client/pull/9709
    • Help React Native import @apollo/client/main.cjs and other CommonJS bundles by @benjamn in https://github.com/apollographql/apollo-client/pull/9716
    • Revamping the "Why Apollo Client" article by @rkoron007 in https://github.com/apollographql/apollo-client/pull/9719
    • Fix useSubscription bug in React v18 StrictMode (#9664) by @kazekyo in https://github.com/apollographql/apollo-client/pull/9707

    New Contributors

    • @ryanrhee made their first contribution in https://github.com/apollographql/apollo-client/pull/9698
    • @santiph made their first contribution in https://github.com/apollographql/apollo-client/pull/9703
    • @theill made their first contribution in https://github.com/apollographql/apollo-client/pull/9621
    • @mlocher made their first contribution in https://github.com/apollographql/apollo-client/pull/9498
    • @FumioNonaka-ksj made their first contribution in https://github.com/apollographql/apollo-client/pull/9529
    • @jean9696 made their first contribution in https://github.com/apollographql/apollo-client/pull/9301
    • @avinoamsn made their first contribution in https://github.com/apollographql/apollo-client/pull/9195
    • @volokolamskspb made their first contribution in https://github.com/apollographql/apollo-client/pull/8630
    • @dragozin made their first contribution in https://github.com/apollographql/apollo-client/pull/8234
    • @krainboltgreene made their first contribution in https://github.com/apollographql/apollo-client/pull/7517
    • @kazekyo made their first contribution in https://github.com/apollographql/apollo-client/pull/9707

    Full Changelog: https://github.com/apollographql/apollo-client/compare/v3.6.3...v3.6.4

    Open source →
    Additional notes2 sources agree

    Bug Fixes

    • Guarantee Concast cleanup without Observable cancelled prematurely rejection, potentially solving long-standing issues involving that error. <br/> @benjamn in #9701

    • Ensure useSubscription subscriptions are properly restarted after unmounting/remounting by React 18 in <StrictMode>. <br/> @kazekyo in #9707

    Improvements

    • Internalize useSyncExternalStore shim, for more control than use-sync-external-store provides, fixing some React Native issues. <br/> @benjamn in #9675 and #9709

    • Provide @apollo/client/**/*.cjs.native.js versions of every @apollo/client/**/*.cjs bundle (including dependencies ts-invariant and zen-observable-ts) to help React Native's Metro bundler automatically resolve CommonJS entry point modules. These changes should render unnecessary the advice we gave in the v3.5.4 section below about metro.config.js. <br/> @benjamn in #9716

    • Handle falsy incoming data more gracefully in offetLimitPagination().merge function. <br/> @shobhitsharma in #9705

    Open source →
  36. 3.6.35 May 2022
    Release notes

    Bug Fixes (from CHANGELOG.md)

    • Simplify useQuery(query, { defaultOptions }) default options processing in order to fix bug where skip: true queries failed to execute upon switching to skip: false. @benjamn in #9665

    • Add tests of skipping/unskipping and useLazyQuery with defaultOptions, and fix a bug causing duplicate requests. @benjamn in #9666

    • Update ts-invariant to version 0.10.2 to fix source map warnings. @benjamn in #9672

    • Test that useQuery queries with skip: true do not stall server-side rendering. @nathanmarks and @benjamn in #9677

    • Prevent useLazyQuery from making duplicate requests when its execution function is first called, and stop rejecting the Promise it returns when result.error is defined. @benjamn in #9684

    • Fix issue with useQuery returning loading: true state during server-side rendering with skip: true. @nathanmarks in #9679

    What's Changed (auto-generated by GitHub)

    • Drastically simplify useQuery default options processing by @benjamn in https://github.com/apollographql/apollo-client/pull/9665
    • Docs: fix typo in subscriptions.mdx by @pobch in https://github.com/apollographql/apollo-client/pull/9663
    • Update ts-invariant to version 0.10.2 to fix source map warnings by @benjamn in https://github.com/apollographql/apollo-client/pull/9672
    • Update queries.mdx by @anilpai in https://github.com/apollographql/apollo-client/pull/5466
    • Fix failing regression test for skipped SSR useQuery stuck in standby by @benjamn in https://github.com/apollographql/apollo-client/pull/9677
    • Add a comment about a new use of the content-type header by @glasser in https://github.com/apollographql/apollo-client/pull/9683
    • Add missing assumeImmutableResults documentation by @henryqdineen in https://github.com/apollographql/apollo-client/pull/9680
    • Prevent useLazyQuery from making duplicate requests when execution function first called by @benjamn in https://github.com/apollographql/apollo-client/pull/9684
    • Fix issue with useQuery returning loading: true state during server-side rendering with skip: true by @nathanmarks in https://github.com/apollographql/apollo-client/pull/9679
    • Add description & example of how to handle multiple parameters in read() when declaring typePolicies. by @Moristotle in https://github.com/apollographql/apollo-client/pull/6755
    • Add link to ts-transform-graphql-tag in the performance docs by @hcharley in https://github.com/apollographql/apollo-client/pull/5608

    New Contributors

    • @anilpai made their first contribution in https://github.com/apollographql/apollo-client/pull/5466
    • @nathanmarks made their first contribution in https://github.com/apollographql/apollo-client/pull/9679
    • @Moristotle made their first contribution in https://github.com/apollographql/apollo-client/pull/6755
    • @hcharley made their first contribution in https://github.com/apollographql/apollo-client/pull/5608

    Full Changelog: https://github.com/apollographql/apollo-client/compare/v3.6.2...v3.6.3

    Open source →
    Additional notes2 sources agree

    Bug Fixes

    • Simplify useQuery(query, { defaultOptions }) default options processing in order to fix bug where skip: true queries failed to execute upon switching to skip: false. <br/> @benjamn in #9665

    • Add tests of skipping/unskipping and useLazyQuery with defaultOptions, and fix a bug causing duplicate requests. <br/> @benjamn in #9666

    • Update ts-invariant to version 0.10.2 to fix source map warnings. <br/> @benjamn in #9672

    • Test that useQuery queries with skip: true do not stall server-side rendering. <br/> @nathanmarks and @benjamn in #9677

    • Prevent useLazyQuery from making duplicate requests when its execution function is first called, and stop rejecting the Promise it returns when result.error is defined. <br/> @benjamn in #9684

    • Fix issue with useQuery returning loading: true state during server-side rendering with skip: true. <br/> @nathanmarks in #9679

    Open source →
  37. 3.6.23 May 2022
    Release notes

    What's Changed

    • fix Missing getServerSnapshot on React 18 and Next 12 by @hungphongbk in https://github.com/apollographql/apollo-client/pull/9652
    • Fix persistedQueries to pull graphqlErrors from networkErrors by @redaid113 in https://github.com/apollographql/apollo-client/pull/9410
    • Update Apollo PersistedQueries in the Apollo BatchHTTP Link by @iamchathu in https://github.com/apollographql/apollo-client/pull/9637
    • Fix code snippets for SubscriptionClient by @rkoron007 in https://github.com/apollographql/apollo-client/pull/9634
    • Correct the wrong link in ROADMAP.md by @yukukotani in https://github.com/apollographql/apollo-client/pull/9650
    • Update Copyright year in LICENSE by @garritfra in https://github.com/apollographql/apollo-client/pull/9630

    New Contributors

    • @iamchathu made their first contribution in https://github.com/apollographql/apollo-client/pull/9637
    • @hungphongbk made their first contribution in https://github.com/apollographql/apollo-client/pull/9652
    • @yukukotani made their first contribution in https://github.com/apollographql/apollo-client/pull/9650
    • @redaid113 made their first contribution in https://github.com/apollographql/apollo-client/pull/9410

    Full Changelog: https://github.com/apollographql/apollo-client/compare/v3.6.1...v3.6.2

    Open source →
    Additional notes2 sources agree

    Bug Fixes

    • Pass getServerSnapshot function to useSyncExternalStore in addition to getSnapshot, though the two functions behave identically. This change should fix/unbreak React 18 server rendering. <br/> @hungphongbk in #9652

    Improvements

    • Consider networkError.result.errors in addition to result.errors in PersistedQueryLink. <br/> @redaid113 and @benjamn in #9410
    Open source →
  38. 3.6.128 Apr 2022
    Release notes

    What's Changed

    • Remove WatchQueryOptions["fetchBlockingPromise"] option due to regressions by @benjamn in https://github.com/apollographql/apollo-client/pull/9636
    • chore(deps): update dependency graphql-ws to v5.8.1 by @renovate in https://github.com/apollographql/apollo-client/pull/9592
    • Update Full-stack tutorial links to point to Odyssey by @rkoron007 in https://github.com/apollographql/apollo-client/pull/9610
    • changes the way the parser filters the array of definitions by @rasulomaroff in https://github.com/apollographql/apollo-client/pull/9622
    • chore: updates roadmap by @jpvajda in https://github.com/apollographql/apollo-client/pull/9628

    New Contributors

    • @rasulomaroff made their first contribution in https://github.com/apollographql/apollo-client/pull/9622
    • @jpvajda made their first contribution in https://github.com/apollographql/apollo-client/pull/9628

    Full Changelog: https://github.com/apollographql/apollo-client/compare/v3.6.0...v3.6.1

    Open source →
    Additional notes2 sources agree

    Bug Fixes

    • Remove recently-added, internal fetchBlockingPromise option from the WatchQueryOptions interface, due to regressions. <br/> @benjamn in #9504
    Open source →
  39. 3.6.026 Apr 2022
    Release notes

    Note: for the most up-to-date version of this information, see CHANGELOG.md

    Apollo Client 3.6.0 (2022-04-26)

    Potentially disruptive changes

    • Calling fetchMore for queries using the cache-and-network or network-only fetch policies will no longer trigger additional network requests when cache results are complete. Instead, those complete cache results will be delivered as if using the cache-first fetch policy. @benjamn in #9504

    • Reimplement useQuery and useLazyQuery to use the proposed useSyncExternalStore API from React 18. @brainkim and @benjamn in #8785 and #9596

    • Fixed bug where the useLazyQuery execution function would always use the refetch method of ObservableQuery, instead of properly reapplying the current fetchPolicy using the reobserve method. @benjamn in #9564

      Since this reobserve method is useful and used internally, we have now exposed it as use[Lazy]Query(...).reobserve (which optionally takes a Partial<WatchQueryOptions> of new options), to supplement the existing refetch method. Note that reobserve permanently updates the variables and other options of the ObservableQuery, unlike refetch({ ...variables }), which does not save those variables.

    • The internal use of options.fetchBlockingPromise by useQuery and useLazyQuery may slightly delay the delivery of network results, compared to previous versions of Apollo Client. Since network results are already delivered asynchronously, these timing differences should not be disruptive in most cases. Nevertheless, please open an issue if the timing differences cause problems for your applications. @benjamn in #9599

    React 18

    In both its peerDependencies and its internal implementation, Apollo Client v3.6 should no longer prevent you from updating to React 18 in your applications.

    Internally, we have refactored useQuery and useLazyQuery to be implemented in terms of React's new (shimmable) useSyncExternalStore hook, demonstrating Apollo Client can serve as an external store with a referentially stable, synchronous API, as needed by React.

    As part of this refactoring, we also improved the behavior of useQuery and useLazyQuery when used in <React.StrictMode>, which double-renders components in development. While this double-rendering always results in calling useQuery twice, forcing Apollo Client to create and then discard an unnecessary ObservableQuery object, we now have multiple defenses in place against executing any network queries for the unused ObservableQuery objects.

    In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling our server-side rendering utilities (getDataFromTree et al.), and introducing suspenseful versions of our hooks, to take full advantage of the new patterns React 18+ enables for data management libraries like Apollo Client.

    Improvements

    • Allow BatchLink to cancel queued and in-flight operations. @PowerKiKi and @benjamn in #9248

    • Add GraphQLWsLink in @apollo/client/link/subscriptions. This link is similar to the existing WebSocketLink in @apollo/client/link/ws, but uses the newer graphql-ws package and protocol instead of the older subscriptions-transport-ws implementation. This functionality was technically first released in @apollo/[email protected], but semantically belongs in the 3.6.0 minor version. @glasser in #9369

    • Allow passing defaultOptions to useQuery to avoid clobbering/resetting existing options when useQuery is called repeatedly. @benjamn in #9563, superseding #9223

    • Provide additional context to nextFetchPolicy functions to assist with fetchPolicy transitions. More details can be found in the nextFetchPolicy documentation. @benjamn in #9222

    • Remove nagging deprecation warning about passing an options.updateQuery function to fetchMore. @benjamn in #9504

    • Let addTypenameToDocument take any ASTNode (including DocumentNode, as before). @benjamn in #9595

    • Set useMutation internal isMounted variable to true again when component remounted. @devpeerapong in #9561

    New Contributors

    • @levrik made their first contribution in https://github.com/apollographql/apollo-client/pull/9299
    • @julienfouilhe made their first contribution in https://github.com/apollographql/apollo-client/pull/9339
    • @ctataryn made their first contribution in https://github.com/apollographql/apollo-client/pull/9434
    • @hennessyevan made their first contribution in https://github.com/apollographql/apollo-client/pull/9470
    • @rkoron007 made their first contribution in https://github.com/apollographql/apollo-client/pull/9500
    • @jergason made their first contribution in https://github.com/apollographql/apollo-client/pull/9419
    • @devpeerapong made their first contribution in https://github.com/apollographql/apollo-client/pull/9561
    Open source →
    Additional notes2 sources agree

    Potentially disruptive changes

    • Calling fetchMore for queries using the cache-and-network or network-only fetch policies will no longer trigger additional network requests when cache results are complete. Instead, those complete cache results will be delivered as if using the cache-first fetch policy. <br/> @benjamn in #9504

    • Reimplement useQuery and useLazyQuery to use the proposed useSyncExternalStore API from React 18. <br/> @brainkim and @benjamn in #8785 and #9596

    • Fixed bug where the useLazyQuery execution function would always use the refetch method of ObservableQuery, instead of properly reapplying the current fetchPolicy using the reobserve method. <br/> @benjamn in #9564

      Since this reobserve method is useful and used internally, we have now exposed it as use[Lazy]Query(...).reobserve (which optionally takes a Partial<WatchQueryOptions> of new options), to supplement the existing refetch method. Note that reobserve permanently updates the variables and other options of the ObservableQuery, unlike refetch({ ...variables }), which does not save those variables.

    • The internal use of options.fetchBlockingPromise by useQuery and useLazyQuery may slightly delay the delivery of network results, compared to previous versions of Apollo Client. Since network results are already delivered asynchronously, these timing differences should not be disruptive in most cases. Nevertheless, please open an issue if the timing differences are a problem for you (and you have no easy workaround). <br/> @benjamn in #9599

    React 18

    In both its peerDependencies and its internal implementation, Apollo Client v3.6 should no longer prevent you from updating to React 18 in your applications.

    Internally, we have refactored useQuery and useLazyQuery to be implemented in terms of React's new (shimmable) useSyncExternalStore hook, demonstrating Apollo Client can serve as an external store with a referentially stable, synchronous API, as needed by React.

    As part of this refactoring, we also improved the behavior of useQuery and useLazyQuery when used in <React.StrictMode>, which double-renders components in development. While this double-rendering always results in calling useQuery twice, forcing Apollo Client to create and then discard an unnecessary ObservableQuery object, we now have multiple defenses in place against executing any network queries for the unused ObservableQuery objects.

    In upcoming v3.6.x and v3.7 (beta) releases, we will be completely overhauling our server-side rendering utilities (getDataFromTree et al.), and introducing suspenseful versions of our hooks, to take full advantage of the new patterns React 18+ enables for data management libraries like Apollo Client.

    Improvements

    • Allow BatchLink to cancel queued and in-flight operations. <br/> @PowerKiKi and @benjamn in #9248

    • Add GraphQLWsLink in @apollo/client/link/subscriptions. This link is similar to the existing WebSocketLink in @apollo/client/link/ws, but uses the newer graphql-ws package and protocol instead of the older subscriptions-transport-ws implementation. This functionality was technically first released in @apollo/[email protected], but semantically belongs in the 3.6.0 minor version. @glasser in #9369

    • Allow passing defaultOptions to useQuery to avoid clobbering/resetting existing options when useQuery is called repeatedly. <br/> @benjamn in #9563, superseding #9223

    • Provide additional context to nextFetchPolicy functions to assist with fetchPolicy transitions. More details can be found in the nextFetchPolicy documentation. <br/> @benjamn in #9222

    • Remove nagging deprecation warning about passing an options.updateQuery function to fetchMore. <br/> @benjamn in #9504

    • Let addTypenameToDocument take any ASTNode (including DocumentNode, as before). <br/> @benjamn in #9595

    • Set useMutation internal isMounted variable to true again when component remounted. <br/> @devpeerapong in #9561

    Open source →
  40. 3.6.0-rc.119 Apr 2022pre-release

    Nothing published for this version

  41. 3.6.0-rc.018 Apr 2022pre-release

    Nothing published for this version

  42. 3.6.0-beta.1314 Apr 2022pre-release

    Nothing published for this version

  43. 3.6.0-beta.1211 Apr 2022pre-release

    Nothing published for this version

  44. 3.6.0-beta.115 Apr 2022pre-release

    Nothing published for this version

  45. 3.6.0-beta.1029 Mar 2022pre-release

    Nothing published for this version

  46. 3.6.0-beta.910 Mar 2022pre-release

    Nothing published for this version

  47. 3.6.0-beta.810 Mar 2022pre-release

    Nothing published for this version

  48. 3.6.0-beta.710 Mar 2022pre-release

    Nothing published for this version

  49. 3.6.0-beta.615 Feb 2022pre-release

    Nothing published for this version

  50. 3.6.0-beta.54 Feb 2022pre-release

    Nothing published for this version

  51. 3.6.0-beta.43 Feb 2022pre-release

    Nothing published for this version

  52. 3.6.0-beta.323 Nov 2021pre-release

    Nothing published for this version

  53. 3.6.0-beta.222 Nov 2021pre-release

    Nothing published for this version

  54. 3.6.0-beta.116 Nov 2021pre-release

    Nothing published for this version

  55. 3.6.0-beta.016 Nov 2021pre-release

    Nothing published for this version

  56. 3.5.1024 Feb 2022
    Release notes2 sources agree

    Improvements

    • Add GraphQLWsLink in @apollo/client/link/subscriptions. This link is similar to the existing WebSocketLink in @apollo/client/link/ws, but uses the newer graphql-ws package and protocol instead of the older subscriptions-transport-ws implementation. <br/> @glasser in #9369

      Note from @benjamn: since GraphQLWsLink is new functionality, we would normally wait for the next minor version (v3.6), but we were asked to expedite this release. These changes are strictly additive/opt-in/backwards-compatible, so shipping them in a patch release (3.5.10) seems safe, if unusual.

    Open source →
  57. 3.5.915 Feb 2022
    Release notes2 sources agree

    Improvements

    • Interpret keyFields: [...] and keyArgs: [...] configurations in InMemoryCache type/field policies as ReadonlyArrays, since they are never mutated internally. <br/> @julienfouilhe in #9339

    • Avoid declaring a global type for the __DEV__ constant, to avoid conflict with other such global declarations. <br/> @benjamn in #9386

    Bug Fixes

    • Fix useSubscription executing skipped subscription when input changes. <br/> @levrik in #9299

    • Fix partial data appearing in useQuery().data when notifyOnNetworkStatusChange: true. <br/> @brainkim in #9367

    • Prevent Promises returned by useLazyQuery execute functions from causing unhandled Promise rejection errors if uncaught. <br/> @brainkim in #9380

    Open source →
  58. 3.5.824 Jan 2022
    Release notes2 sources agree

    Bug Fixes

    • Fix the type of the called property returned by useQuery() and useLazyQuery(). <br/> @sztadii in #9304

    Bug Fixes (by @brainkim in #9328)

    • Fix refetch() not being called when skip is true.
    • Fix the promise returned from the useLazyQuery() execution function having stale variables.
    • Fix the promise returned from the useLazyQuery() execution function not rejecting when a query errors.
    Open source →
  59. 3.5.710 Jan 2022
    Release notes2 sources agree

    Bug Fixes

    • Fix regression that prevented calling onError or onCompleted in some cases when using useQuery. <br/> @mmahalwy in #9226

    • Make useQuery respect defaultOptions.watchQuery.fetchPolicy. <br/> @yasharzolmajdi in #9210

    Open source →
  60. 3.5.67 Dec 2021
    Release notes2 sources agree

    Bug Fixes (by @brainkim in #9144)

    • Restores old behavior where the callback passed to useMutation() is constant.
    • Fix useMutation() callbacks having stale closures.
    • Fix useQuery() variables being out of date.
    Open source →