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
ASGI support #215
Comments
We'll be very happy if you'll provide an integration of tartiflette in bocadillo. Tartiflette, per se, doesn't care about the transport. Tartiflette-aiohttp is just an example of integration into a webserver. You can use tartiflette anywhere you want. We are also studying the creation of a tartiflette-starlette example. Feel free to provide a bocadillo integration, we'll link it in the doc/readme when available. |
What is blocking you from serving tartiflette executed graphql requests from bocadillo ? |
Thanks for your answer!
To be honest, I haven’t digged into the problem just yet. :-) I thought that since Tartiflette had an aiohttp integration there was some kind of special/advanced work required to make it work in a web environment. It’s good hearing that this should be easy enough. I’d love working on a Bocadillo integration, though I think the more sustainable/reusable approach would be to provide an ASGI adapter which Bocadillo and other frameworks can integrate in their own way later on. I’ll have to dig into Tartiflette internals to see how this could work. :-) |
Basicly tartiflette is a simple thing. |
Yes, sooo — I took inspiration from tartiflette-aiohttp and Starlette's GraphQL ASGI app, and… There it is! tartiflette-asgi 🎉 Feel free to take a look and share your thoughts! Still need to add tests and publish to PyPI, but it's working pretty smoothly already. |
Very nice !! Since it's a starlette integration, can you name it tartiflette-starlette ? |
I’m not sure it should be named after Starlette, since in practice it can be plugged into any ASGI framework regardless of whether said framework uses Starlette itself. |
I think that it could be a good opportunity for your project (and us) to join the « tartiflette » organization on github. @florimondmanca what do you think ? |
@tsunammis I think it makes sense from a maintenance and future-proofing perspective. To be honest I'm concerned with ownership over the project — will I remain one of the maintainers? Are there any rules/processes/standards/guidelines for repos under the dailymotion org? |
@florimondmanca We created a new organization called tartiflette, which not belongs to the dailymotion one. The idea is to officially host and support some projects from the community, like yours. You will keep the ownership over the project, obviously, we will work closely to bring a consistent and good developer experience over all the tartiflette projects. |
Brilliant! Very good idea to create a separate organization to help Tartiflette stand on its own feet. I can initiate the repo transfer. I read in Transferring a repository that you'll receive an email to accept the transfer, then I'll be added as a collaborator to the transferred repo (i.e. |
@florimondmanca perfect! I'd be delighted to chat with you through slack about our vision, the next subjects we will tackle and the DevExp we want to provide, are you interested in? |
@florimondmanca You can initiate the transfer, I will accept it. |
@tsunammis I tried to transfer the repo but got this permission error:
But the docs read "The target account must not have a repository with the same name" so I think you need to add me to the org w/ write access beforehand. |
Sure! Can't promise anything on how much I'll contribute but I'm interested in knowing where Tartiflette is heading at. :-) You can send me a Slack invite for florimond.manca[@]gmail.com |
@florimondmanca I sent you an invitation to join the organization. |
@tsunammis Roger that. Transfer complete 🎉 Do I already have write access for https://github.com/tartiflette/tartiflette-starlette? |
@florimondmanca Yes, you already have the right access ;-) |
I'll consider this issue closed now ;) |
Request a feature
Hi, I saw that Tartiflette supports HTTP as a transport layer via
tartiflette-aiohttp
. That's pretty cool, but I think there may be a better option to enable interoperability with other parts of the Python async web stack: ASGI.It's the equivalent of WSGI for async: the de-facto standard interface between async web apps and async web servers (eg uvicorn). AFAIK, Tartiflette doesn't have support for ASGI yet.
I think providing an ASGI adapter for Tartiflette would foster interest in the project, as it would allow any web framework based on ASGI (i.e. all of them now) to mount a Tartiflette endpoint. The most popular option for now is Graphene, which Starlette provides an ASGI adapter for, but it is synchronous and thus insufficient.
To be honest, I am considering a potential integration with Bocadillo, an async web framework I am the maintainer of, but for now there doesn't seem to be a way to serve a Tartiflette GraphQL endpoint through ASGI.
I'm not that familiar with aiohttp, and perhaps it has a feature that would already enable this. If so, I'd be glad to read more!
P.S.: I'm not sure whether I should have opened this on tartiflette-aiohttp. If necessary I can transfer the issue!
The text was updated successfully, but these errors were encountered: