Closed
Description
When implementing a parser from the spec. I had a hard time deciding on the right case when certain TypeExtension
s are used with the query operation shorthand. Namely the EnumTypeExtension
, InputObjectTypeExtension
, InterfaceTypeExtension
, and ObjectTypeExtension
.
The issue arises with programs like the following:
extend interface Foo @somedir
{
bar: String
}
this can according to the specification be interpreted as either
- the document containing a single
InterfaceTypeExtension
with thebar: String
field definition (and a directive), - or the document containing a
InterfaceTypeExtension
and a shorthand query with the fieldString
aliased asbar
.
Notice that the program
extend interface Foo
{
bar: String
}
is unequivocally a document containing a single InterfaceTypeExtension
.
I would like to get this ambiguity cleared up and would be happy to submit a PR with the right solution.
Metadata
Metadata
Assignees
Labels
No labels