-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
fix(GraphQL): Disallow Subscription typename. #6077
Conversation
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.
Reviewed 3 of 3 files at r1.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @jatindevdg and @MichaelJCompton)
graphql/schema/gqlschema_test.yml, line 2693 at r1 (raw file):
owns: [Object] @dgraph(pred: "~Object.owner") }
Why add newlines here?
graphql/schema/rules.go, line 275 at r1 (raw file):
"StringExactFilter": true, "StringHashFilter": true, "Subscription": true,
Why is it forbidden as an input name as well? I thought we only forbid it as a typename.
graphql/schema/rules.go, line 1785 at r1 (raw file):
func isReservedKeyWord(name string) bool { if isScalar(name) || isQueryOrMutation(name) || isReserve(name) {
instead of creating a function called isReserve
, just define the map here in this function and use it.
graphql/schema/schemagen_test.go, line 170 at r1 (raw file):
_, authError := FromString(schHandler.GQLSchema())
Any reason to remove this newline?
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.
Reviewable status: 0 of 2 files reviewed, 4 unresolved discussions (waiting on @MichaelJCompton and @pawanrawal)
graphql/schema/gqlschema_test.yml, line 2693 at r1 (raw file):
Previously, pawanrawal (Pawan Rawal) wrote…
Why add newlines here?
By mistake, deleted now.
graphql/schema/rules.go, line 275 at r1 (raw file):
Previously, pawanrawal (Pawan Rawal) wrote…
Why is it forbidden as an input name as well? I thought we only forbid it as a typename.
yeah not required, i checked and deleted it.
graphql/schema/rules.go, line 1785 at r1 (raw file):
Previously, pawanrawal (Pawan Rawal) wrote…
instead of creating a function called
isReserve
, just define the map here in this function and use it.
changed it.
graphql/schema/schemagen_test.go, line 170 at r1 (raw file):
Previously, pawanrawal (Pawan Rawal) wrote…
Any reason to remove this newline?
This is also by mistake, deleted now .
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.
Reviewed 3 of 3 files at r2.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @MichaelJCompton and @pawanrawal)
This PR disallow Subscription typename so that it doesn't conflict with Subscriptions generated. (cherry picked from commit 601e837)
This PR disallow Subscription typename so that it doesn't conflict with Subscriptions generated.
This change is