Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rob-blackbourn/bareasgi-graphql-next
A GraphQL and graphene package for bareASGI
https://github.com/rob-blackbourn/bareasgi-graphql-next
asgi asyncio bareasgi graphene graphql python web
Last synced: 3 months ago
JSON representation
A GraphQL and graphene package for bareASGI
- Host: GitHub
- URL: https://github.com/rob-blackbourn/bareasgi-graphql-next
- Owner: rob-blackbourn
- License: apache-2.0
- Created: 2019-03-07T18:52:18.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-04-27T08:28:47.000Z (over 1 year ago)
- Last Synced: 2024-03-15T00:56:03.395Z (10 months ago)
- Topics: asgi, asyncio, bareasgi, graphene, graphql, python, web
- Language: Python
- Homepage: https://rob-blackbourn.github.io/bareASGI-graphql-next/
- Size: 5.5 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bareASGI-graphql-next
Graphql support for [bareASGI](http://github.com/rob-blackbourn/bareASGI) (read the [documentation](https://rob-blackbourn.github.io/bareASGI-graphql-next/))
The controller provides a GraphQL GET and POST route, a WebSocket subscription server, and a Graphiql view.
## Installation
Install from the pie shop.
```bash
pip install bareasgi-graphql-next
```If you wish to install with the grapheme option:
```bash
pip install 'bareasgi-graphql-next[graphene]'
```## Usage
You can register the graphql controller with the `add_graphql_next` function.
```python
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)
```
## Development
To develop with the graphene optional package:
```bash
poetry install --extras graphene
```