-
Notifications
You must be signed in to change notification settings - Fork 72
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: add support for async schema in flask #102
Conversation
e8488eb
to
5430779
Compare
What's the status on this? |
5430779
to
3617a1c
Compare
Is there any update on this issue? |
@bhuijbers are you depending on this issue? Do you mind sharing more about your use case? I have finished implementing this PR but am hesitant to merge it coz I'm not sure this is the correct solution to support async in flask. |
@kiendang Yes. Unfortunately I can't help you make a decision about this being a correct solution or not. |
Is there any update on this issue? |
@bhuijbers I'm gonna close this PR without merging. It attempted to add async support to the existing sync GraphQLView approach which I don't think is the right approach. Instead, we should create a separate |
Supersede #66.
#66 implements async schema support for flask 1.0 by opening a hook to await for asynchronous execution results with
asyncio.run
. Flask 2.0 brought async/await support and provides similar hook inflask.Flask.ensure_sync
which this PR uses instead. See sections extensions and other event loops in the Flask async/await doc.