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

Make root field configurable #54

Open
jonaskello opened this issue Jan 1, 2020 · 0 comments
Open

Make root field configurable #54

jonaskello opened this issue Jan 1, 2020 · 0 comments

Comments

@jonaskello
Copy link
Member

jonaskello commented Jan 1, 2020

Today it is hardcoded as ROOT_QUERY which means that even if you are normalizing the result of a mutation the result will still be keyed by ROOT_QUERY. This causes problems when you use __typename and fragments. The __typename of ROOT_QUERY should be Query but if you merge the result of a mutation the __typename of ROOT_QUERY will change to Mutation and fragment on Query will not find the root anymore.

You should be able to send in the key so mutations could get ROOT_MUTATION. And also it is nice to not have it hardcoded of course.

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