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
352 stars 25 forks source link

[idea] add `replaceImplementation` to `registerApolloClient` return value for mocking in tests #234

Open phryneas opened 1 month ago

phryneas commented 1 month ago

Right now, people don't really write RSC tests yet, but since there is no context, there is also no easy way of swapping out the makeClient function in a test.

We could provide a replaceImplementation function that returns a Disposable to use in tests.