graphql-go-tools
graphql-go-tools copied to clipboard
accept queries with comments
It is not possible to parse comments inside queries.
Request Example
curl --location --request POST 'http://localhost:8080/user/' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"query SubgraphIntrospectQuery {\n # eslint-disable-next-line\n _service {\n sdl\n }\n}","variables":{}}'
Actual Response
{
"errors": [
{
"message": "unexpected token - got: COMMENT want one of: [RBRACE IDENT SPREAD]",
"locations": [
{
"line": 2,
"column": 5
}
]
}
]
}
Expected Response
{
"data": {
"_service": {
"sdl": "extend type Query {\n me: User\n}\n\ntype User @key(fields: \"id\") {\n id: ID!\n name: String\n username: String\n}\n"
}
}
}