This repository was archived by the owner on Mar 20, 2023. It is now read-only.
This repository was archived by the owner on Mar 20, 2023. It is now read-only.
Raw GraphQL request on req object #197
Closed
Description
Hello
I'd like to output the original GraphQL query (and any variables) to the console whenever an error is thrown in order to make debugging easier. At the moment I can't see any way of doing this as req.body isn't available as express-graphql is doing it's own body parsing, and the raw query doesn't seem to get passed anywhere.
The closest thing I've found so far is fieldNodes which is an object describing the query, but it's still quite difficult to reverse engineer the original query from this.
Could we get the raw query added to the express req object?
Thanks!
Metadata
Metadata
Assignees
Labels
No labels