-
Notifications
You must be signed in to change notification settings - Fork 429
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
[GraphQL October 2021] Forbid __typename
on subscription root
#1001
Conversation
FCM
|
__typename
on subscription root__typename
on subscription root
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anything else seems good.
if let OperationType::Subscription = operation.item.operation_type { | ||
for selection in &operation.item.selection_set { | ||
if let Selection::Field(field) = selection { | ||
if field.item.name.item == "__typename" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add tests fully covering this in this module below along with others.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anything else is nice 👍
juniper_actix/Cargo.toml
Outdated
@@ -13,10 +13,10 @@ subscriptions = ["juniper_graphql_ws", "tokio"] | |||
|
|||
[dependencies] | |||
actix = "0.12" | |||
actix-http = "3.0.0-beta.13" | |||
actix-http = "3.0.0-beta.15" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, disolve such thing to a separate PR next time.
Part of #1000
Synopsis
RFC
Solution
Add validation rule, that errors on
__typename
query onsubscription
root.Checklist
Draft:
prefixDraft:
prefix is removed