Updated Flask-GraphQL requirement

This commit is contained in:
Syrus Akbary 2016-01-28 12:32:09 -08:00
parent 235a24e966
commit 87d455637c
4 changed files with 8 additions and 8 deletions

View File

@ -22,7 +22,7 @@ Django integration:
- **django-graphiql**: [Source Code][7] - [PyPI package][8]
Flask integration:
- **graphql-flask**: [Source Code][9] - [PyPI package][10]
- **Flask-GraphQL**: [Source Code][9] - [PyPI package][10]
## Other related projects
@ -40,5 +40,5 @@ Flask integration:
[6]: https://pypi.python.org/pypi/graphql-django-view
[7]: https://github.com/graphql-python/django-graphiql
[8]: https://pypi.python.org/pypi/django-graphiql
[9]: https://github.com/graphql-python/graphql-flask
[10]: https://pypi.python.org/pypi/graphql-flask
[9]: https://github.com/graphql-python/flask-graphql
[10]: https://pypi.python.org/pypi/Flask-GraphQL

View File

@ -30,7 +30,7 @@ pip install graphene[sqlalchemy]
# Install Flask and GraphQL Flask for exposing the schema through HTTP
pip install Flask
pip install graphql-flask
pip install Flask-GraphQL
```
## Defining our models
@ -121,12 +121,12 @@ Unlike a RESTful API, there is only a single URL from which GraphQL is accessed.
We are going to use Flask to create a server that expose the GraphQL schema under `/graphql` and a interface for querying it easily: GraphiQL under `/graphiql`.
Afortunately for us, the library `graphql-flask` that we installed previously is making the task quite easy.
Afortunately for us, the library `Flask-GraphQL` that we installed previously is making the task quite easy.
```python
# flask_sqlalchemy/app.py
from flask import Flask
from graphql_flask import GraphQL
from flask_graphql import GraphQL
from models import db_session
from schema import schema, Department

View File

@ -2,7 +2,7 @@ from flask import Flask
from database import db_session, init_db
from schema import schema
from graphql_flask import GraphQL
from flask_graphql import GraphQL
app = Flask(__name__)
app.debug = True

View File

@ -1,4 +1,4 @@
graphene[sqlalchemy]
graphql_flask==1.1.0
SQLAlchemy==1.0.11
Flask==0.10.1
Flask-GraphQL==1.1.0