-
-
Notifications
You must be signed in to change notification settings - Fork 678
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
Async Subscription topic filters #470
Comments
Unfortunately, it's not possible. Please open an issue on their repo about adding support for async |
This comment has been minimized.
This comment has been minimized.
I'm currently looking into this limitation and the one from #617 myself and I don't quite understand the reliance on When changing the definition for the export declare type ResolverFn = (rootValue?: any, args?: any, context?: any, info?: any) => AsyncIterator<any> | Promise<AsyncIterator<any>>;
The As Is there anything I'm missing here? |
Yes.
TypeGraphQL was created 3 years ago. Introducing some other replacement, especially custom one, requires a lot of effort and is a breaking change for all the users. |
That's fair, but the package seems to purely provide Their |
In my project I just do |
The library has been abandoned long ago. This is never going to happen. There is no reason to type If that isn't compelling enough to change this behavior, then I'm probably out of luck. Depending on an abandoned library shouldn't be something to be happy about in the first place though. |
I have in plans for But this is a breaking change as now you have put redis-based |
Closing as implemented by #1578 🔒 |
Describe the solution you'd like
I'd like to be able to put authorization checks inside the subscription
topics
option so that I can dynamically block or allow users on subscriptions. Right now my auth checks are asynchronous but the SubscriptionTopicFunc doesn't accept Promises.Describe alternatives you've considered
It's possible to put the authorization checks in the
filter
method or in the subscription logic itself, however this means that the authorization checks will fire for every event instead of just once at subscription time which is much more expensive.Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: