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

Single field subscriptions validator has conflicts with the spec #2715

Closed
nikis05 opened this issue Jul 22, 2020 · 5 comments
Closed

Single field subscriptions validator has conflicts with the spec #2715

nikis05 opened this issue Jul 22, 2020 · 5 comments
Labels

Comments

@nikis05
Copy link

nikis05 commented Jul 22, 2020

The rule: https://github.com/graphql/graphql-js/blob/master/src/validation/rules/OverlappingFieldsCanBeMergedRule.js

The spec states that subscriptions should have a single root field. Current implementation only checks that there is one selection on selection set of the subscription, not taking fragments into account. If a single selection is a fragment spread or an inline fragment (with multiple fields) this rule will wrongfully pass.

@nikis05 nikis05 changed the title Single field subscriptions rule has conflicts with the spec Single field subscriptions validator has conflicts with the spec Jul 22, 2020
@kshitij86
Copy link

I would like to look into this issue and work on a fix. @IvanGoncharov can I please get assigned to solve this bug?

@benjie
Copy link
Member

benjie commented Nov 30, 2020

I noticed this too; whoever fixes this, please can you ping me on #2861 as I'll need to incorporate the fix into that PR.

@benjie
Copy link
Member

benjie commented Dec 5, 2020

I may have resolved this bug as part of #2861

@yaacovCR
Copy link
Contributor

@benjie can this be closed?

@benjie
Copy link
Member

benjie commented Oct 18, 2021

I believe so 👍

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

No branches or pull requests

5 participants