{
"info": {
"author": "Sergey Porivaev",
"author_email": "porivaevs@gmail.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Topic :: Software Development :: Libraries"
],
"description": "|travis| |coveralls| |pypi|\n\nSanic-GraphQL\n=============\n\nAdds `GraphQL `__ support to your `Sanic `__ application.\n\nBased on `flask-graphql`_ by `Syrus Akbary`_.\n\nUsage\n-----\n\nJust use the ``GraphQLView`` view from ``sanic_graphql``\n\n.. code:: python\n\n from sanic_graphql import GraphQLView\n\n app.add_route(GraphQLView.as_view(schema=Schema, graphiql=True), '/graphql')\n\n # Optional, for adding batch query support (used in Apollo-Client)\n app.add_route(GraphQLView.as_view(schema=Schema, batch=True), '/graphql/batch')\n\nThis will add ``/graphql`` endpoint to your app.\n\nSharing eventloop with Sanic\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nIn order to pass Sanic's eventloop to GraphQL's ``AsyncioExecutor``, use ``before_start`` listener:\n\n.. code:: python\n\n @app.listener('before_server_start')\n def init_graphql(app, loop):\n app.add_route(GraphQLView.as_view(schema=Schema, executor=AsyncioExecutor(loop=loop)), '/graphql')\n\n\nSupported options\n~~~~~~~~~~~~~~~~~\n\n- ``schema``: The ``GraphQLSchema`` object that you want the view to\n execute when it gets a valid request.\n- ``context``: A value to pass as the ``context`` to the ``graphql()``\n function. By default is set to ``dict`` with request object at key ``request``.\n- ``root_value``: The ``root_value`` you want to provide to\n ``executor.execute``.\n- ``pretty``: Whether or not you want the response to be pretty printed\n JSON.\n- ``executor``: The ``Executor`` that you want to use to execute queries. If an ``AsyncioExecutor`` instance is provided,\n performs queries asynchronously within executor's loop.\n- ``graphiql``: If ``True``, may present\n `GraphiQL `__ when loaded\n directly from a browser (a useful tool for debugging and\n exploration).\n- ``graphiql_template``: Inject a Jinja template string to customize\n GraphiQL.\n- ``jinja_env``: Sets jinja environment to be used to process GraphiQL template. If Jinja's async mode is enabled (by ``enable_async=True``), uses\n ``Template.render_async`` instead of ``Template.render``. If environment is not set, fallbacks to simple regex-based renderer.\n- ``batch``: Set the GraphQL view as batch (for using in\n `Apollo-Client `__\n or\n `ReactRelayNetworkLayer `__)\n\n\nYou can also subclass ``GraphQLView`` and overwrite\n``get_root_value(self, request)`` to have a dynamic root value per\nrequest.\n\n.. code:: python\n\n class UserRootValue(GraphQLView):\n def get_root_value(self, request):\n return request.user\n\nLicense\n-------\n\nCopyright for portions of project `sanic-graphql`_ are held by `Syrus Akbary`_ as part of project `flask-graphql`_. All other copyright for project `sanic-graphql`_ \nare held by `Sergey Porivaev `__.\n\nThis project is licensed under MIT License.\n\n\n\n.. _`flask-graphql` : https://github.com/graphql-python/flask-graphql\n.. _`Syrus Akbary`: https://github.com/syrusakbary\n.. _`sanic-graphql`: https://github.com/grazor/sanic-graphql\n\n.. |travis| image:: https://travis-ci.org/graphql-python/sanic-graphql.svg?branch=master\n :target: https://travis-ci.org/graphql-python/sanic-graphql\n\n.. |coveralls| image:: https://coveralls.io/repos/github/graphql-python/sanic-graphql/badge.svg?branch=master\n :target: https://coveralls.io/github/graphql-python/sanic-graphql?branch=master\n\n.. |pypi| image:: https://badge.fury.io/py/Sanic-GraphQL.svg\n :target: https://badge.fury.io/py/Sanic-GraphQL",
"description_content_type": null,
"docs_url": null,
"download_url": "https://github.com/graphql-python/sanic-graphql/releases",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/graphql-python/sanic-graphql",
"keywords": "api graphql protocol sanic",
"license": "MIT",
"maintainer": "",
"maintainer_email": "",
"name": "Sanic-GraphQL",
"package_url": "https://pypi.org/project/Sanic-GraphQL/",
"platform": "any",
"project_url": "https://pypi.org/project/Sanic-GraphQL/",
"project_urls": {
"Download": "https://github.com/graphql-python/sanic-graphql/releases",
"Homepage": "https://github.com/graphql-python/sanic-graphql"
},
"release_url": "https://pypi.org/project/Sanic-GraphQL/1.1.0/",
"requires_dist": null,
"requires_python": "",
"summary": "Adds GraphQL support to your Sanic application",
"version": "1.1.0"
},
"last_serial": 5343782,
"releases": {
"1.0.0": [
{
"comment_text": "",
"digests": {
"md5": "bba0969cf4bb751553b3f4105beb6cc5",
"sha256": "ed6dbb6c44bf49a2e6ab0ee7b82bcb412485a317856acb3df58c7bc83750e2a9"
},
"downloads": -1,
"filename": "Sanic-GraphQL-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "bba0969cf4bb751553b3f4105beb6cc5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7861,
"upload_time": "2017-03-01T17:17:25",
"url": "https://files.pythonhosted.org/packages/0e/af/d5fd0f5b56e3ee322c108bbf4b03b0bc2ff4082f0fd50359553cd0bba8a7/Sanic-GraphQL-1.0.0.tar.gz"
}
],
"1.0.1": [],
"1.0.2": [
{
"comment_text": "",
"digests": {
"md5": "ce95ee487ff9051997b95f1868ace467",
"sha256": "4dbfcf9a58bb12e3a7333fdf9a0c983582cefb464d4de2f90c0ba7bd0380f15d"
},
"downloads": -1,
"filename": "Sanic-GraphQL-1.0.2.tar.gz",
"has_sig": false,
"md5_digest": "ce95ee487ff9051997b95f1868ace467",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8043,
"upload_time": "2017-03-05T12:50:10",
"url": "https://files.pythonhosted.org/packages/ec/9a/47f94904a52db3678b228cce752ea34d2aa903f8403c6d883c7b57390407/Sanic-GraphQL-1.0.2.tar.gz"
}
],
"1.1.0": [
{
"comment_text": "",
"digests": {
"md5": "1a03c11580f5914a71b0b8dd48053370",
"sha256": "6aab908e849bbbc5dc5ba01df7599769a03fc9693fb793654c6537f7aaec4e2d"
},
"downloads": -1,
"filename": "Sanic-GraphQL-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "1a03c11580f5914a71b0b8dd48053370",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7421,
"upload_time": "2017-04-18T16:22:37",
"url": "https://files.pythonhosted.org/packages/df/a7/6664520baddce5dae741fb05a49228da838110672150803782e49ec0b705/Sanic-GraphQL-1.1.0.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "1a03c11580f5914a71b0b8dd48053370",
"sha256": "6aab908e849bbbc5dc5ba01df7599769a03fc9693fb793654c6537f7aaec4e2d"
},
"downloads": -1,
"filename": "Sanic-GraphQL-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "1a03c11580f5914a71b0b8dd48053370",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7421,
"upload_time": "2017-04-18T16:22:37",
"url": "https://files.pythonhosted.org/packages/df/a7/6664520baddce5dae741fb05a49228da838110672150803782e49ec0b705/Sanic-GraphQL-1.1.0.tar.gz"
}
]
}