Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency @apollo/client to v3.6.2 #5343

Merged
merged 3 commits into from
May 4, 2022

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Apr 27, 2022

WhiteSource Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@apollo/client (source) 3.5.10 -> 3.6.2 age adoption passing confidence

Release Notes

apollographql/apollo-client

v3.6.2

Compare Source

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.

    @​hungphongbk in #​9652
Improvements

v3.6.1

Compare Source

Bug Fixes
  • Remove recently-added, internal fetchBlockingPromise option from the WatchQueryOptions interface, due to regressions.

    @​benjamn in #​9504

v3.6.0

Compare Source

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 are a problem for you (and you have no easy workaround).

    @​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/client@3.5.10, 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


Configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Renovate will not automatically rebase this PR, because other commits have been found.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by WhiteSource Renovate. View repository job log here.

@renovate renovate bot added the release:chore This PR is a chore (means nothing for users) label Apr 27, 2022
@netlify
Copy link

netlify bot commented Apr 27, 2022

Deploy Preview for redwoodjs-docs canceled.

Name Link
🔨 Latest commit 49ebc11
🔍 Latest deploy log https://app.netlify.com/sites/redwoodjs-docs/deploys/62722f20b1f7fd000988f4ff

@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch 6 times, most recently from 9b1571f to c770f9a Compare April 28, 2022 23:23
@renovate renovate bot changed the title fix(deps): update dependency @apollo/client to v3.6.0 fix(deps): update dependency @apollo/client to v3.6.1 Apr 29, 2022
@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch 18 times, most recently from fc385f4 to ab60665 Compare May 2, 2022 08:46
@jtoar jtoar closed this May 2, 2022
@renovate
Copy link
Contributor Author

renovate bot commented May 2, 2022

Renovate Ignore Notification

As this PR has been closed unmerged, Renovate will now ignore this update (3.6.1). You will still receive a PR once a newer version is released, so if you wish to permanently ignore this dependency, please add it to the ignoreDeps array of your renovate config.

If this PR was closed by mistake or you changed your mind, you can simply rename this PR and you will soon get a fresh replacement PR opened.

@renovate renovate bot deleted the renovate/apollo-graphql-packages branch May 2, 2022 09:20
@jtoar jtoar restored the renovate/apollo-graphql-packages branch May 2, 2022 13:23
@jtoar jtoar reopened this May 2, 2022
@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch 7 times, most recently from 33d322a to 0071c8b Compare May 3, 2022 00:38
@renovate renovate bot changed the title fix(deps): update dependency @apollo/client to v3.6.1 fix(deps): update dependency @apollo/client to v3.6.2 May 3, 2022
@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch 4 times, most recently from a491ee8 to 2f8116c Compare May 3, 2022 04:31
@jtoar jtoar marked this pull request as draft May 3, 2022 05:18
@jtoar jtoar self-assigned this May 3, 2022
@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch from 49adde9 to be1ecdd Compare May 4, 2022 06:50
@jtoar jtoar marked this pull request as ready for review May 4, 2022 07:50
@jtoar jtoar merged commit 2ed4d7c into main May 4, 2022
@jtoar jtoar deleted the renovate/apollo-graphql-packages branch May 4, 2022 08:10
@jtoar jtoar modified the milestones: next-release, v1.4.0 May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:chore This PR is a chore (means nothing for users)
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants