GraphQLBundle icon indicating copy to clipboard operation
GraphQLBundle copied to clipboard

How to debug exceptions?

Open brunoreis opened this issue 7 years ago • 1 comments

Exceptions are being transformed into graphql error, and this is good. But, is there an easy way to turn this off so that we can see the exception trace to debug errors?

brunoreis avatar Mar 03 '17 19:03 brunoreis

We've implemented our own ExecutionContext and overrode the addError class by setting our own class as a parameter named graphql.execution_context.class (simply add this value to the parameters.yml(.dist) and provide a valid class name to use). You can get the DI container within the addError method via $this->getContainer() and use whatever services you need.

garte avatar Apr 07 '17 14:04 garte