Skip to content
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

gqlparser fails to parse extend type with a doc comment #142

Open
boxmein opened this issue Jan 18, 2021 · 0 comments
Open

gqlparser fails to parse extend type with a doc comment #142

boxmein opened this issue Jan 18, 2021 · 0 comments

Comments

@boxmein
Copy link

boxmein commented Jan 18, 2021

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!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant