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

The "newly" added read/merge functions from typePolicies are not async like the old local resolvers #9895

Closed
rpopovici opened this issue Jul 8, 2022 · 4 comments

Comments

@rpopovici
Copy link

We are trying to migrate from apollo client 2.x to 3.x. One of the challenges we are facing is the fact that the old local async resolves cannot be migrated to the newly added read/merge functions.

Potential solution: make read/merge async.

@fbartho
Copy link

fbartho commented Jul 8, 2022

I suspect that risks a significant performance penalty, and is probably exactly why they removed the old APIs

@rpopovici
Copy link
Author

I fail to see where is the perf penalty in this case. Except that the cache update action will be delayed until the promise is resolved. The old resolver was slower because you could call queries from async resolvers which led to cache duplication

@jpvajda jpvajda transferred this issue from apollographql/apollo-feature-requests Jul 8, 2022
@alessbell
Copy link
Contributor

This is a duplicate of apollographql/apollo-feature-requests#383 which contains more discussion/info. Please follow the other issue for updates on this topic, closing.

@alessbell alessbell closed this as not planned Won't fix, can't repro, duplicate, stale Apr 28, 2023
@github-actions
Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
For general questions, we recommend using StackOverflow or our discord server.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 29, 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

No branches or pull requests

4 participants