Skip to content

Commit c116a04

Browse files
committed
Updated READMEs
1 parent 6b9ffdc commit c116a04

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ This will add `/graphql` and `/graphiql` endpoints to your app.
2727
* `executor`: The `Executor` that you want to use to execute queries.
2828
* `graphiql`: If `True`, may present [GraphiQL](https://github.com/graphql/graphiql) when loaded directly from a browser (a useful tool for debugging and exploration).
2929
* `graphiql_template`: Inject a Jinja template string to customize GraphiQL.
30+
* `batch`: Set the GraphQL view as batch (for using in [Apollo-Client](http://dev.apollodata.com/core/network.html#query-batching) or [ReactRelayNetworkLayer](https://github.com/nodkz/react-relay-network-layer))
3031

3132
You can also subclass `GraphQLView` and overwrite `get_root_value(self, request)` to have a dynamic root value
3233
per request.

README.rst

+16-6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ Just use the ``GraphQLView`` view from ``flask_graphql``
1616
1717
app.add_url_rule('/graphql', view_func=GraphQLView.as_view('graphql', schema=schema, graphiql=True))
1818
19+
# Optional, for adding batch query support (used in Apollo-Client)
20+
app.add_url_rule('/graphql/batch', view_func=GraphQLView.as_view('graphql', schema=schema, batch=True))
21+
1922
This will add ``/graphql`` and ``/graphiql`` endpoints to your app.
2023

2124
Supported options
@@ -32,8 +35,15 @@ Supported options
3235
- ``executor``: The ``Executor`` that you want to use to execute
3336
queries.
3437
- ``graphiql``: If ``True``, may present
35-
[GraphiQL][https://github.com/graphql/graphiql] when loaded directly
36-
from a browser (a useful tool for debugging and exploration).
38+
`GraphiQL <https://github.com/graphql/graphiql>`__ when loaded
39+
directly from a browser (a useful tool for debugging and
40+
exploration).
41+
- ``graphiql_template``: Inject a Jinja template string to customize
42+
GraphiQL.
43+
- ``batch``: Set the GraphQL view as batch (for using in
44+
`Apollo-Client <http://dev.apollodata.com/core/network.html#query-batching>`__
45+
or
46+
`ReactRelayNetworkLayer <https://github.com/nodkz/react-relay-network-layer>`__)
3747

3848
You can also subclass ``GraphQLView`` and overwrite
3949
``get_root_value(self, request)`` to have a dynamic root value per
@@ -47,7 +57,7 @@ request.
4757
4858
.. |Build Status| image:: https://travis-ci.org/graphql-python/flask-graphql.svg?branch=master
4959
:target: https://travis-ci.org/graphql-python/flask-graphql
50-
.. |Coverage Status| image:: https://coveralls.io/repos/graphql-python/graphql-flask/badge.svg?branch=master&service=github
51-
:target: https://coveralls.io/github/graphql-python/graphql-flask?branch=master
52-
.. |PyPI version| image:: https://badge.fury.io/py/graphql-flask.svg
53-
:target: https://badge.fury.io/py/graphql-flask
60+
.. |Coverage Status| image:: https://coveralls.io/repos/graphql-python/flask-graphql/badge.svg?branch=master&service=github
61+
:target: https://coveralls.io/github/graphql-python/flask-graphql?branch=master
62+
.. |PyPI version| image:: https://badge.fury.io/py/flask-graphql.svg
63+
:target: https://badge.fury.io/py/flask-graphql

0 commit comments

Comments
 (0)