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

Pretend that __typename exists on the root Query. #4853

Merged
merged 4 commits into from
May 23, 2019

Conversation

benjamn
Copy link
Member

@benjamn benjamn commented May 22, 2019

Should fix #4848 by allowing fragments to match against the root Query selection set.

Note that this implementation does not inject __typename into the query document using addTypenameToDocument, since that would needlessly increase the size of every query/response, and we can always infer the __typename of the Query.

@benjamn benjamn requested a review from hwillson May 22, 2019 23:21
@benjamn benjamn self-assigned this May 22, 2019
@benjamn benjamn merged commit 758f6f7 into master May 23, 2019
@benjamn benjamn deleted the issue-4848-Query-typename branch May 23, 2019 16:46
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 17, 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

Successfully merging this pull request may close these issues.

Query containing "fragment X on Query { __type ..." causes unexpected behaviour / error
1 participant