You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature request: GraphQLExtension.didEncounterErrors could receive the current context or requestContext. I would like to use it for logging, but I need the context (in our case, it holds a request ID which we'd like to see in our monitoring).
We work around this by using willSendResponse instead. This works, however in TypeScript this requires casting of GraphQLFormattedError to GraphQLError to get all the details we'd like to log. This could lead to bugs if apollo-server ever decides to strip the additional properties of GraphQLError when converting to GraphQLFormattedError.
The text was updated successfully, but these errors were encountered:
didEncounterErrors should have access to the current context under requestContext.context: #2719. Feel free to re-open this issue if that isn't working for you.
Feature request: GraphQLExtension.didEncounterErrors could receive the current context or requestContext. I would like to use it for logging, but I need the context (in our case, it holds a request ID which we'd like to see in our monitoring).
We work around this by using willSendResponse instead. This works, however in TypeScript this requires casting of GraphQLFormattedError to GraphQLError to get all the details we'd like to log. This could lead to bugs if apollo-server ever decides to strip the additional properties of GraphQLError when converting to GraphQLFormattedError.
The text was updated successfully, but these errors were encountered: