Closed janhalama closed 5 years ago
@janhalama: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/
I found out that withFilter asyncInteratorFn is not the right place for subscription authorization and used resolve handler instead.
Use case:
asyncIteratorFn
is place where I want to authorize the 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 toPromise<AsyncIterator<any>>
to be able to await for the result of the service call in asyncIteratorFn handler