graphql-python / graphql-python/graphene
Validate that a subscription query only contains 1 field
Open
✨ enhancement
- Dominant language
- Python
- Stars
- 8.2k
- Forks
- 818
- PR merge metrics
- No merged PRs in 30d
Description
The way that GraphQL-core implements subscriptions means that if you make a subscription query with more than 1 field in it only the resolver for the first field will be called. See: graphql-python/graphql-core@3267c4c/src/graphql/subscription/subscribe.py#L147-L151
There should be some validation on the `subscribe` method on the `Schema` class to make sure that 1 field is only ever passed to a subscription query to prevent confusion.
See https://github.com/graphql-python/graphene/pull/1107#issuecomment-657194024
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.