Skip to content
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

Closed
wants to merge 4 commits into from

Conversation

kiendang
Copy link
Collaborator

@kiendang kiendang commented Dec 30, 2022

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 in flask.Flask.ensure_sync which this PR uses instead. See sections extensions and other event loops in the Flask async/await doc.

@kiendang kiendang marked this pull request as draft January 2, 2023 09:27
@kiendang kiendang force-pushed the flask-async branch 2 times, most recently from e8488eb to 5430779 Compare January 4, 2023 02:36
@erikwrede
Copy link
Member

What's the status on this?

@bhuijbers
Copy link

Is there any update on this issue?

@kiendang
Copy link
Collaborator Author

kiendang commented Apr 6, 2023

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.

@bhuijbers
Copy link

bhuijbers commented Apr 14, 2023

@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.

@bhuijbers
Copy link

Is there any update on this issue?

@kiendang
Copy link
Collaborator Author

kiendang commented May 8, 2023

@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 AsyncGraphQLView. I've create issue #110 with some pointers in case you or anyone else wants to implement that.

@kiendang kiendang closed this May 8, 2023
@kiendang kiendang deleted the flask-async branch May 8, 2023 15:57
@kiendang kiendang restored the flask-async branch May 17, 2023 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants