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

Migrate all React Apollo SSR features into Apollo Client #6499

Merged
merged 5 commits into from
Jun 30, 2020
Merged

Conversation

hwillson
Copy link
Member

This PR migrates all @apollo/react-ssr functionality out of the https://github.com/apollographql/react-apollo repo, into this project. SSR features are kept out of the main @apollo/client bundle, and are instead reachable through the @apollo/client/react/ssr entry point.

hwillson and others added 5 commits June 30, 2020 13:44
Move the `react-apollo` projects `@apollo/react-ssr` features
into this project. This will help us discontinue the
`react-apollo` project sooner than later.
This keeps React SSR features out of the main bundle. React SSR
can be accessed through the separate `@apollo/client/react/ssr`
entry point.
Copy link
Member

@benjamn benjamn left a comment

Choose a reason for hiding this comment

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

Looks great! Rebased and pushed one additional commit that seemed worthwhile.

* @apollo/client/core
* @apollo/client/cache
* @apollo/client/utilities
* @apollo/client/react/ssr
Copy link
Member

Choose a reason for hiding this comment

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

Given that @apollo/client/react/ssr is currently the only subdirectory entry point within @apollo/client/react, I would love to see @apollo/client/react/components and @apollo/client/react/hoc added as well!

@benjamn benjamn merged commit 83e6014 into master Jun 30, 2020
@SiddharthMantri
Copy link
Contributor

SiddharthMantri commented Jul 10, 2020

@benjamn . How would you import something like renderStringWithData now?

This particular code snippet: import { renderToStringWithData } from "@apollo/client/react/ssr"; doesn't seem to work for me with the error message: Error: Cannot find module '@apollo/client/react/ssr'.

I'm on "@apollo/client": "^3.0.0-rc.12" if that helps

benjamn pushed a commit that referenced this pull request Jul 15, 2020
The Apollo Client SSR functionality has migrated into `@apollo/client`
(@hwillson in #6499). This PR updates the migration guide page in the v3
documentation.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants