Graphql support for bareASGI (read the documentation)
The controller provides a GraphQL GET and POST route, a WebSocket subscription server, and a Graphiql view.
Install from the pie shop.
pip install bareasgi-graphql-next
If you wish to install with the grapheme option:
pip install 'bareasgi-graphql-next[graphene]'
You can register the graphql controller with the add_graphql_next
function.
from bareasgi import Application
from bareasgi_graphql_next import add_graphql_next
import graphql
# Get the schema ...
schema = graphql.GraphQLSchema( ... )
import uvicorn
app = Application()
add_graphql_next(app, schema)
uvicorn.run(app, port=9009)
To develop with the graphene optional package:
poetry install --extras graphene