-
Notifications
You must be signed in to change notification settings - Fork 2k
schema-kitchen-sink.graphql has out-of-spec test case #650
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
Comments
Also applies to |
Changing the parser from "any" to "many" results in these tests failing:
A cursory look through Github (via the BigQuery public dataset) didn't turn up any public uses which expect zero fields. |
Thanks for the investigation, @tcr! There's two directions we could go. One is to change this implementation from "any" to "many" as you suggest, the other is to change the language in the spec proposal from One benefit from the "many" approach suggested in the spec proposal is that schema text like I'm open to feedback about how to address this, but I'm leaning in favor of leaving this implementation as is, but changing the spec proposal to the "any" case to match, thus potentially allowing invalid schema text to be written, but not limiting otherwise reasonable use cases. The invalid schema text can still be caught by other systems - schema validation (which we already have baked into the schema constructor functions) as an example. |
I think you're leaning in the right direction. |
I can also scope the change only to |
To summarize my understanding:
And of course you could split |
@swolchok @tcr It was fixed in graphql/graphql-spec@bde02b9
|
Thanks for following up on this, @IvanGoncharov! I definitely intended to mark this issue fixed with that set of changes. |
Line 67 of schema-kitchen-sink.graphql is
extend type Foo @onType {}
. According to both the prose schema language extension spec and the full summary of the grammar from graphql/graphql-spec#90, this is ungrammatical:TypeExtensionDefinition : extend ObjectTypeDefinition
ObjectTypeDefinition : type Name ImplementsInterfaces? Directives? { FieldDefinition+ }
At least one
FieldDefinition
must be included to matchFieldDefinition+
according to the notation conventions:I'm not sure if this is a bug in the (admittedly RFC) spec or the graphql-js implementation.
The text was updated successfully, but these errors were encountered: