-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Feature: Opt-in to including Apollo Client local resolver code in your bundle #8189
Comments
I think I've changed my mind about this! If we're already asking folks to change how they pass local
I want to thank @vigie for pointing out in #7072 that it's not fair/reasonable of us to deprecate local resolvers AND keep standing in the way of implementing them in the link chain (like Since the link chain is async-friendly, it's tempting to save bundle size by using dynamic |
If this is the decision (and I would fully support it), suggest this is closed in favor of a new issue to track the work involved in creating |
It's been a year, but but I feel like this still needs an update!
https://www.apollographql.com/docs/react/local-state/local-resolvers/ points at this thread in its deprecation warning |
Closing in favor of #10060 |
While the local resolvers API has been superseded by the type and field policies API, we think it will be too jarring to remove local resolvers completely from Apollo Client 4. If people aren't using local resolvers however, we would like to ensure that the local resolver code in core can be tree-shaken away. To do this, we're going to make local resolvers opt-in along these lines:
All local resolver code in core is currently isolated to the
LocalState
class. If interested in using local resolvers, Apollo Client will require creating aLocalState
instance, and passing it into theApolloClient
constructor (and we'll consider changingLocalState
to something likeLocalResolvers
, to reduce confusion).The text was updated successfully, but these errors were encountered: