You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suggestion: Could there be an additional option added to the graphiql_options dictionary which allows you to override the resource directory for all of the .js and .css files currently being pulled from CDN?
So for example, the resource base would default to "//cdn.jsdelivr.net" but this could be overridden to a local path if I have a mirrored copy of the resource files on disk.
To anyone else facing this issue: In the end I just hosted static copies of the js/css resource files via aiohttp directly, rather than enabling the built-in graphiql endpoint provided by tartiflette-aiohttp.
Example code:
from aiohttp import web
from tartiflette_aiohttp import register_graphql_handlers
app = register_graphql_handlers(...)
# Register /graphiql endpoint
graphiql_dir = "/path/to/static/graphiql/resources"
app.router.add_static("/graphiql", graphiql_dir)
async def graphiql_handler(request):
"""Redirector to handle /graphiql -> /graphiql/index.html"""
return web.HTTPFound("/graphiql/index.html")
app.router.add_route("GET", "/graphiql", graphiql_handler)
I am trying to go through the tartiflette tutorial at https://tartiflette.io/docs/tutorial/getting-started
This is being done on a machine behind a firewall, which does not have outside internet access.
The built-in graphiql endpoint at http://localhost:8080/graphiql just displays "Loading..." forever. This is because it tries and fails to download a bunch of resources from http://cdn.jsdelivr.net
What are my options for getting GraphiQL up and running locally, without an internet connection?
The text was updated successfully, but these errors were encountered: