-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Response Interceptor? #932
Comments
We may still tweak parts of this API but with Apollo Server const server = new ApolloServer({
typeDefs,
resolvers,
plugins: [
{
requestDidStart({ request }) {
console.log(request);
return {
willSendResponse({ response }) {
console.log(response);
},
};
},
},
],
}); Fixed by #1795. Let us know how it works! |
@abernix This works but strips the response headers (null in this case) which contains traceId (as sent from the server) for logging purpose. |
@kartikjain26 I don't understand how this would be stripping anything. If there's a bug, please open a new issue with a runnable reproduction, per the instructions when opening the issue. Thanks! |
@abernix Thanks, but I was able to extract response headers in |
If you find the documentation is specifically lacking on a particular topic, please submit a concrete issue with what information is missing. Merely stating that the documentation is not exhaustive doesn't give us an idea where we should focus our attention. Thanks! |
I need to store every API response somewhere in the logging database. How to intercept GraphQL API response?
The text was updated successfully, but these errors were encountered: