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

Apollo cache does not support unions and interfaces #356

Open
rafarubim opened this issue Jul 22, 2019 · 0 comments
Open

Apollo cache does not support unions and interfaces #356

rafarubim opened this issue Jul 22, 2019 · 0 comments

Comments

@rafarubim
Copy link
Contributor

I'm opening this issue to address the fact that the Apollo InMemoryCache instance created by render-runtime uses by default the HeuristicFragmentMatcher. Also it has no way (like an opt-in option) to use the IntrospectionFragmentMatcher.

This means that Queries or Mutations that use GraphQL Unions or Interfaces don't work correctly with the cache. For that reason, clients may have Query/Mutation issues without even knowing why data is incorrectly fetched (because the cache gets in the way).

IntrospectionFragmentMatcher poses the disadvantage of requiring schema-knowledge for correct execution (https://www.apollographql.com/docs/react/advanced/fragments/#fragments-on-unions-and-interfaces). An approach to make this feature available needs to be thoroughly thought of.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant