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
issues running example #14
Comments
(For other people reading this, @cs01 is referring to https://github.com/bocadilloproject/react-example which uses Bocadillo.) For For the rest, it seems to me you are exposing the naked Did you see this section: Mount onto an ASGI application? |
The docs say
I was going for the former, which I didn't think required Bocadillo. After I got that working I was going to try to mount it onto a bocadillo app. This is the code I'm trying to run (copied directly from the README):
|
Hmm. The command you are running is Instead, you need to "mount" the Tartiflette app onto a Bocadillo app, i.e.: # app.py
from bocadillo import App
from .graphql import app as graphql_app # <- graphql.py copy-pasted from README
app = App()
app.mount("/", graphql_app) (Here, "mounted" should really means "sub-routed", and that depends on how the framework of choice implements this mechanism. Maybe |
Thanks! Yes I was serving the tartiflette app from app.py (I just overwrote it). I was actually working on what you just described and moved the tartiflette app to graphql.py. I'm getting the following. Here is my branch https://github.com/bocadilloproject/react-example/tree/graphql.
|
Ah I see what I was doing wrong now. Like you said, the uvicorn command shouldn't have had asgi in it. It works perfectly with I still don't know why the Bocadillo app is reporting |
Cool! I moved the
Because it's not a Bocadillo app. 😉 You created a |
Ah yes I just ran it again without the asgi and that one worked too. I was originally trying to run the Bocadillo app and switched back and forth. It's my first time running Starlette so I have a bit of muscle memory for Bocadillo. 😄 thanks! |
I am trying to get the example set up in react-example, but am running into some issues.
When running the example tartiflette app, I get:
I add the
graphiql.html
file by copying and pasting its contents.Then I get:
Output of pip freeze:
The text was updated successfully, but these errors were encountered: