-
Notifications
You must be signed in to change notification settings - Fork 132
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
feat: enable withFilter ResolverFn to return Promise #197
feat: enable withFilter ResolverFn to return Promise #197
Conversation
Any reason why this one hasn't been merged in? We feel like it would be really useful for our workflow as well! |
Isn't this a breaking change? |
Would like to have this functionality too! We could just check if the return value is a promise before resolving it to ensure backward compatibility. |
@simonsterckx @grantwwu thanx for your comments, please see my latest update to this PR, I moved required functionality into new function withFilterAsync, withFilter function remains unchanged. |
@simonsterckx @grantwwu bump! Anything I can do to keep this PR moving? It would be great if we could get this functionality merged in |
Hey, until I see more activity from Apollo with regards to helping me do code reviews and participating in the maintenance of this - there doesn't seem to have been a post in the #contributing channel of the Apollo Spectrum chat for several months now - I'm going to put my participation on hold here, for two reasons:
|
Use case: asyncIteratorFn of withFilter is place where I want to authorize subscription, authorization should not be implemented in GraphQL resolvers, I want to delegate authorization logic to the business layer which is in our case implemented in another service, that is why I need to change result of ResolverFn to Promise<AsyncIterator> to be able to await for the result of the service call in asyncIteratorFn handler