I use graphql-codegen to parse and pre-compile queries into AST (DocumentNode). When I send the query to the server as JSON, I get Invalid query error due to this check.
It looks like both parseReq and prepare are designed^1 to handle this properly. So I think this is a bug.
Expected behavior: no error; handler uses provided AST
Current behavior: {"errors":[{"message":"Invalid query"}]}
Hello!
I use graphql-codegen to parse and pre-compile queries into AST (
DocumentNode
). When I send the query to the server as JSON, I getInvalid query
error due to this check.It looks like both
parseReq
andprepare
are designed^1 to handle this properly. So I think this is a bug.Expected behavior: no error; handler uses provided AST Current behavior:
{"errors":[{"message":"Invalid query"}]}
Example cURL: