apollographql / apollo-client-nextjs

Apollo Client support for the Next.js App Router
https://www.npmjs.com/package/@apollo/experimental-nextjs-app-support
MIT License
358 stars 25 forks source link

Update README to fix issue #262 #269

Closed nodegin closed 1 month ago

nodegin commented 1 month ago

In version 0.9.0, some packages have been separated from @apollo/experimental-nextjs-app-support/ssr,

this PR updates the correct usage so people can follow.

apollo-cla commented 1 month ago

@nodegin: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/

phryneas commented 1 month ago

I'm sorry, but that's not the intended way of using it.

If you are using @apollo/experimental-nextjs-app-support, you should also import everything from @apollo/experimental-nextjs-app-support - and in this case from @apollo/experimental-nextjs-app-support/ssr.

We will eventually move the /rsc and /ssr imports together to @apollo/experimental-nextjs-app-support and rename NextSSRApolloClient etc. to just ApolloClient. That's planned for version 0.11.0.

But you'll always only be importing from the @apollo/experimental-nextjs-app-support and @apollo/client packages.

"@apollo/client-react-streaming" is only interesting for you if you want to integrate Apollo Client with another framework (or a hand-written solution).