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: useFragment SSR support #10458

Merged
merged 2 commits into from
Jan 23, 2023

Conversation

lennyburdette
Copy link
Contributor

Addresses #10457

Passes getServerSnapshot to useSyncExternalStore so that it doesn't trigger a Missing getServerSnapshot error when using useFragment_experimental on the server.

Checklist:

  • If this PR contains changes to the library itself (not necessary for e.g. docs updates), please include a changeset (see CONTRIBUTING.md)
  • [-] If this PR is a new feature, please reference an issue where a consensus about the design was reached (not necessary for small changes)
  • Make sure all of the significant new logic is covered by tests

Addresses apollographql#10457

Passes `getServerSnapshot` to `useSyncExternalStore` so that it doesn't trigger a `Missing getServerSnapshot` error when using `useFragment_experimental` on the server.
@changeset-bot
Copy link

changeset-bot bot commented Jan 20, 2023

🦋 Changeset detected

Latest commit: d45ed82

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@apollo/client Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Member

@jerelmiller jerelmiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 🎉 🔥 🔥

Thanks so much! We'll get this out with our next patch release!

@alessbell alessbell merged commit b5ccef2 into apollographql:main Jan 23, 2023
@github-actions github-actions bot mentioned this pull request Jan 23, 2023
@lennyburdette lennyburdette deleted the usefragment-ssr branch January 23, 2023 18:12
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants