#Access graphql response with interceptors

7 messages · Page 1 of 1 (latest)

distant crater
#

Hello, is there a way to access graphql's final response with interceptors?

steep stump
#

The final response? No. Interceptors run after the resolver, and apollo finshes modification of the response after that. There may be a way through some apollo middleware or configuration option, but I'm not immediately aware of it

distant crater
#

I would like to be able to log graphql errors, any idea about how I could achieve that?

I'm using GraphQL Yoga btw

steep stump
#

What GraphQL Errors? Like the invalid query ones? No clue.

distant crater
#

This type of errors :

steep stump
#

Yeah, I think those happen as a validation step at the gql server level before it makes its way to Nest. You'd need to look into Yoga's docs about how to manage those

distant crater
#

I'll have a look at it, thank you!