-
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
[feature] async formatResponse and formatError #2274
Comments
I'm running into an issue with with |
Same! |
Same |
Same. I need some data from cache or db to decorate response. How can I do it without async support?! |
Any workaround for this? I need to make an http call (apollo-rest-datasource) under certain conditions before returning response (formatResponse). Couldn't find any other Apollo Server function that executes after all resolvers are resolved. I actually am using Sentry too to report any error occuring in formatError function, but errors are generally sent so I didn't except to have a problem with this until reading this issue. |
@vinicius73 any news here? I am facing the same issue... @dunika My problem is exactly the same, using a very similar stack. Were you able to solve it? |
This should be possible by using the new request pipeline plugin API. |
@martijnwalraven I can't find anything in the docs any of this. Has this been released? Do you have an example of where/how the @bertero Sorry for the late response I havn't implemented any solution for this but you could use graphql-middleware](https://github.com/prisma/graphql-middleware) to do I I'd say |
@dunika Docs seem to be still WIP, I found a preview here: |
Hooks formatResponse and formatError do not accept async operations.
Tools that report errors are difficult to use because formatError does not support async operations.
I particularly need to perform some operations with each graphql response, I can not because formatResponse is not async.
I'm doing tests and adjustments and I intend to send a PR soon, before I'm starting a dialogue about it.
Related #1748
The text was updated successfully, but these errors were encountered: