gqlparser
gqlparser copied to clipboard
gqlparser fails to parse `extend type` with a doc comment
If I have a type like this:
extend type Foo @key(fields: "id") {
id: ID!
}
Then adding a doc comment will fail to parse.
Sample input:
"""
Doc comment
"""
extend type Foo @key(fields: "id") {
id: ID!
}
Expected behavior: parses
Actual behavior:
failed to load schema:schema.graphqls:3: Unexpected BlockString "Doc comment"exit status 1
A possible workaround is available: the following code block parses correctly.
"""
Doc comment
"""
type Foo @key(fields: "id") @extends {
id: ID!
}