From 92d390a6a6d3372f4d1fe4b5c647bd514544f67a Mon Sep 17 00:00:00 2001 From: Alvin Chow Date: Fri, 11 Dec 2020 14:57:49 -0800 Subject: [PATCH 1/9] Add execution_context_class in Flask GraphQLView --- graphql_server/flask/graphqlview.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/graphql_server/flask/graphqlview.py b/graphql_server/flask/graphqlview.py index 063a67a..4bb4665 100644 --- a/graphql_server/flask/graphqlview.py +++ b/graphql_server/flask/graphqlview.py @@ -37,6 +37,7 @@ class GraphQLView(View): graphiql_html_title = None middleware = None validation_rules = None + execution_context_class = None batch = False subscriptions = None headers = None @@ -82,6 +83,9 @@ def get_validation_rules(self): return specified_rules return self.validation_rules + def get_execution_context_class(self): + return self.execution_context_class + def dispatch_request(self): try: request_method = request.method.lower() @@ -105,6 +109,7 @@ def dispatch_request(self): context_value=self.get_context(), middleware=self.get_middleware(), validation_rules=self.get_validation_rules(), + execution_context_class=self.get_execution_context_class(), ) result, status_code = encode_execution_results( execution_results, From bc874abee694eed51d6f2947206132491059d320 Mon Sep 17 00:00:00 2001 From: Kien Dang Date: Mon, 26 Dec 2022 12:17:55 +0800 Subject: [PATCH 2/9] Add flask execution_context_class test --- tests/flask/test_graphqlview.py | 15 +++++++++++++++ tests/utils.py | 7 +++++++ 2 files changed, 22 insertions(+) diff --git a/tests/flask/test_graphqlview.py b/tests/flask/test_graphqlview.py index 9b388f9..5dc3be0 100644 --- a/tests/flask/test_graphqlview.py +++ b/tests/flask/test_graphqlview.py @@ -5,6 +5,7 @@ import pytest from flask import url_for +from ..utils import RepeatExecutionContext from .app import create_app @@ -578,3 +579,17 @@ def test_batch_allows_post_with_operation_name(app, client): assert response_json(response) == [ {"data": {"test": "Hello World", "shared": "Hello Everyone"}} ] + + +@pytest.mark.parametrize( + "app", [create_app(execution_context_class=RepeatExecutionContext)] +) +def test_custom_execution_context_class(app, client): + response = client.post( + url_string(app), + data=json_dump_kwarg(query="{test}"), + content_type="application/json", + ) + + assert response.status_code == 200 + assert response_json(response) == {"data": {"test": "Hello WorldHello World"}} diff --git a/tests/utils.py b/tests/utils.py index 895c777..ee082d4 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -1,6 +1,7 @@ from typing import List from graphql import ExecutionResult +from graphql.execution import ExecutionContext def as_dicts(results: List[ExecutionResult]): @@ -14,3 +15,9 @@ def as_dicts(results: List[ExecutionResult]): } for result in results ] + + +class RepeatExecutionContext(ExecutionContext): + def execute_field(self, parent_type, source, field_nodes, path): + result = super().execute_field(parent_type, source, field_nodes, path) + return result * 2 From cb327cb3b416142c07b3ec4af16a830c24d4fb6a Mon Sep 17 00:00:00 2001 From: Kien Dang Date: Mon, 26 Dec 2022 12:18:44 +0800 Subject: [PATCH 3/9] Add support for execution_context_class in aiohttp --- graphql_server/aiohttp/graphqlview.py | 5 +++++ tests/aiohttp/test_graphqlview.py | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/graphql_server/aiohttp/graphqlview.py b/graphql_server/aiohttp/graphqlview.py index d98becd..fa4d998 100644 --- a/graphql_server/aiohttp/graphqlview.py +++ b/graphql_server/aiohttp/graphqlview.py @@ -35,6 +35,7 @@ class GraphQLView: graphiql_html_title = None middleware = None validation_rules = None + execution_context_class = None batch = False jinja_env = None max_age = 86400 @@ -83,6 +84,9 @@ def get_validation_rules(self): return specified_rules return self.validation_rules + def get_execution_context_class(self): + return self.execution_context_class + @staticmethod async def parse_body(request): content_type = request.content_type @@ -158,6 +162,7 @@ async def __call__(self, request): context_value=self.get_context(request), middleware=self.get_middleware(), validation_rules=self.get_validation_rules(), + execution_context_class=self.get_execution_context_class(), ) exec_res = ( diff --git a/tests/aiohttp/test_graphqlview.py b/tests/aiohttp/test_graphqlview.py index 4a06ec5..41e31d3 100644 --- a/tests/aiohttp/test_graphqlview.py +++ b/tests/aiohttp/test_graphqlview.py @@ -6,6 +6,7 @@ from aiohttp import FormData from aiohttp.test_utils import TestClient, TestServer +from ..utils import RepeatExecutionContext from .app import create_app, url_string from .schema import AsyncSchema @@ -682,3 +683,18 @@ async def test_preflight_incorrect_request(client): ) assert response.status == 400 + + +@pytest.mark.asyncio +@pytest.mark.parametrize( + "app", [create_app(execution_context_class=RepeatExecutionContext)] +) +async def test_custom_execution_context_class(client): + response = await client.post( + "/graphql", + data=json.dumps(dict(query="{test}")), + headers={"content-type": "application/json"}, + ) + + assert response.status == 200 + assert await response.json() == {"data": {"test": "Hello WorldHello World"}} From 8f146007f967eff7c1aa9eecd951f64d3a76fc0d Mon Sep 17 00:00:00 2001 From: Kien Dang Date: Mon, 26 Dec 2022 12:19:06 +0800 Subject: [PATCH 4/9] Add support for execution_context_class in quart --- graphql_server/quart/graphqlview.py | 5 +++++ tests/quart/test_graphqlview.py | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/graphql_server/quart/graphqlview.py b/graphql_server/quart/graphqlview.py index 107cfdc..2ac624b 100644 --- a/graphql_server/quart/graphqlview.py +++ b/graphql_server/quart/graphqlview.py @@ -37,6 +37,7 @@ class GraphQLView(View): graphiql_html_title = None middleware = None validation_rules = None + execution_context_class = None batch = False enable_async = False subscriptions = None @@ -83,6 +84,9 @@ def get_validation_rules(self): return specified_rules return self.validation_rules + def get_execution_context_class(self): + return self.execution_context_class + async def dispatch_request(self): try: request_method = request.method.lower() @@ -106,6 +110,7 @@ async def dispatch_request(self): context_value=self.get_context(), middleware=self.get_middleware(), validation_rules=self.get_validation_rules(), + execution_context_class=self.get_execution_context_class(), ) exec_res = ( [ diff --git a/tests/quart/test_graphqlview.py b/tests/quart/test_graphqlview.py index 8e0833c..d0da414 100644 --- a/tests/quart/test_graphqlview.py +++ b/tests/quart/test_graphqlview.py @@ -7,6 +7,7 @@ from quart.typing import TestClientProtocol from werkzeug.datastructures import Headers +from ..utils import RepeatExecutionContext from .app import create_app @@ -733,3 +734,21 @@ async def test_batch_allows_post_with_operation_name( assert response_json(result) == [ {"data": {"test": "Hello World", "shared": "Hello Everyone"}} ] + + +@pytest.mark.asyncio +@pytest.mark.parametrize( + "app", [create_app(execution_context_class=RepeatExecutionContext)] +) +async def test_custom_execution_context_class(app: Quart, client: TestClientProtocol): + response = await execute_client( + app, + client, + method="POST", + data=json_dump_kwarg(query="{test}"), + headers=Headers({"Content-Type": "application/json"}), + ) + + assert response.status_code == 200 + result = await response.get_data(as_text=True) + assert response_json(result) == {"data": {"test": "Hello WorldHello World"}} From 26fdc4f7b8bdc7144293cc74f79fdf642bbcb8af Mon Sep 17 00:00:00 2001 From: Kien Dang Date: Mon, 26 Dec 2022 12:19:24 +0800 Subject: [PATCH 5/9] Add support for execution_context_class in sanic --- graphql_server/sanic/graphqlview.py | 5 +++++ tests/sanic/test_graphqlview.py | 15 +++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/graphql_server/sanic/graphqlview.py b/graphql_server/sanic/graphqlview.py index 8604e33..7bea500 100644 --- a/graphql_server/sanic/graphqlview.py +++ b/graphql_server/sanic/graphqlview.py @@ -37,6 +37,7 @@ class GraphQLView(HTTPMethodView): graphiql_html_title = None middleware = None validation_rules = None + execution_context_class = None batch = False jinja_env = None max_age = 86400 @@ -85,6 +86,9 @@ def get_validation_rules(self): return specified_rules return self.validation_rules + def get_execution_context_class(self): + return self.execution_context_class + async def __handle_request(self, request, *args, **kwargs): try: request_method = request.method.lower() @@ -112,6 +116,7 @@ async def __handle_request(self, request, *args, **kwargs): context_value=self.get_context(request), middleware=self.get_middleware(), validation_rules=self.get_validation_rules(), + execution_context_class=self.get_execution_context_class(), ) exec_res = ( [ diff --git a/tests/sanic/test_graphqlview.py b/tests/sanic/test_graphqlview.py index d6ef556..d71fa62 100644 --- a/tests/sanic/test_graphqlview.py +++ b/tests/sanic/test_graphqlview.py @@ -3,6 +3,7 @@ import pytest +from ..utils import RepeatExecutionContext from .app import create_app, url_string from .schema import AsyncSchema @@ -618,3 +619,17 @@ def test_preflight_incorrect_request(app): ) assert response.status == 400 + + +@pytest.mark.parametrize( + "app", [create_app(execution_context_class=RepeatExecutionContext)] +) +def test_custom_execution_context_class(app): + _, response = app.test_client.post( + uri=url_string(), + content=json_dump_kwarg(query="{test}"), + headers={"content-type": "application/json"}, + ) + + assert response.status == 200 + assert response_json(response) == {"data": {"test": "Hello WorldHello World"}} From 036f0262dad0ed7d2939f28185d64c9c52ed33f2 Mon Sep 17 00:00:00 2001 From: Kien Dang Date: Mon, 26 Dec 2022 12:19:38 +0800 Subject: [PATCH 6/9] Add support for execution_context_class in webob --- graphql_server/webob/graphqlview.py | 5 +++++ tests/webob/test_graphqlview.py | 15 +++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/graphql_server/webob/graphqlview.py b/graphql_server/webob/graphqlview.py index 4c7b9e8..1048e49 100644 --- a/graphql_server/webob/graphqlview.py +++ b/graphql_server/webob/graphqlview.py @@ -36,6 +36,7 @@ class GraphQLView: graphiql_html_title = None middleware = None validation_rules = None + execution_context_class = None batch = False enable_async = False subscriptions = None @@ -81,6 +82,9 @@ def get_validation_rules(self): return specified_rules return self.validation_rules + def get_execution_context_class(self): + return self.execution_context_class + def dispatch_request(self, request): try: request_method = request.method.lower() @@ -107,6 +111,7 @@ def dispatch_request(self, request): context_value=self.get_context(request), middleware=self.get_middleware(), validation_rules=self.get_validation_rules(), + execution_context_class=self.get_execution_context_class(), ) result, status_code = encode_execution_results( execution_results, diff --git a/tests/webob/test_graphqlview.py b/tests/webob/test_graphqlview.py index e1d783d..53e9680 100644 --- a/tests/webob/test_graphqlview.py +++ b/tests/webob/test_graphqlview.py @@ -3,6 +3,7 @@ import pytest +from ..utils import RepeatExecutionContext from .app import Client, url_string @@ -563,3 +564,17 @@ def test_batch_allows_post_with_operation_name(client, settings): "data": {"test": "Hello World", "shared": "Hello Everyone"} } ] + + +@pytest.mark.parametrize( + "settings", [dict(execution_context_class=RepeatExecutionContext)] +) +def test_custom_execution_context_class(client): + response = client.post( + url_string(), + data=json_dump_kwarg(query="{test}"), + content_type="application/json", + ) + + assert response.status_code == 200 + assert response_json(response) == {"data": {"test": "Hello WorldHello World"}} From 663fd5677860769c6ae461f1d08e5a9e688e60bd Mon Sep 17 00:00:00 2001 From: Kien Dang Date: Mon, 26 Dec 2022 12:24:46 +0800 Subject: [PATCH 7/9] Add docs for execution_context_class --- docs/aiohttp.md | 3 ++- docs/flask.md | 5 +++-- docs/sanic.md | 7 ++++--- docs/webob.md | 5 +++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/docs/aiohttp.md b/docs/aiohttp.md index d65bcb8..a7dcdd9 100644 --- a/docs/aiohttp.md +++ b/docs/aiohttp.md @@ -55,11 +55,12 @@ gql_view(request) # <-- the instance is callable and expects a `aiohttp.web.Req * `graphiql_version`: The graphiql version to load. Defaults to **"1.0.3"**. * `graphiql_template`: Inject a Jinja template string to customize GraphiQL. * `graphiql_html_title`: The graphiql title to display. Defaults to **"GraphiQL"**. - * `jinja_env`: Sets jinja environment to be used to process GraphiQL template. If Jinja’s async mode is enabled (by `enable_async=True`), uses + * `jinja_env`: Sets jinja environment to be used to process GraphiQL template. If Jinja’s async mode is enabled (by `enable_async=True`), uses `Template.render_async` instead of `Template.render`. If environment is not set, fallbacks to simple regex-based renderer. * `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)) * `middleware`: A list of graphql [middlewares](http://docs.graphene-python.org/en/latest/execution/middleware/). * `validation_rules`: A list of graphql validation rules. + * `execution_context_class`: Specifies a custom execution context class. * `max_age`: Sets the response header Access-Control-Max-Age for preflight requests. * `encode`: the encoder to use for responses (sensibly defaults to `graphql_server.json_encode`). * `format_error`: the error formatter to use for responses (sensibly defaults to `graphql_server.default_format_error`. diff --git a/docs/flask.md b/docs/flask.md index f3a36e7..4e67015 100644 --- a/docs/flask.md +++ b/docs/flask.md @@ -58,7 +58,8 @@ More info at [Graphene v3 release notes](https://github.com/graphql-python/graph * `graphiql_html_title`: The graphiql title to display. Defaults to **"GraphiQL"**. * `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)) * `middleware`: A list of graphql [middlewares](http://docs.graphene-python.org/en/latest/execution/middleware/). - * `validation_rules`: A list of graphql validation rules. + * `validation_rules`: A list of graphql validation rules. + * `execution_context_class`: Specifies a custom execution context class. * `encode`: the encoder to use for responses (sensibly defaults to `graphql_server.json_encode`). * `format_error`: the error formatter to use for responses (sensibly defaults to `graphql_server.default_format_error`. * `subscriptions`: The GraphiQL socket endpoint for using subscriptions in graphql-ws. @@ -79,4 +80,4 @@ class UserRootValue(GraphQLView): ``` ## Contributing -See [CONTRIBUTING.md](../CONTRIBUTING.md) \ No newline at end of file +See [CONTRIBUTING.md](../CONTRIBUTING.md) diff --git a/docs/sanic.md b/docs/sanic.md index e922598..1c046f8 100644 --- a/docs/sanic.md +++ b/docs/sanic.md @@ -47,11 +47,12 @@ This will add `/graphql` endpoint to your app and enable the GraphiQL IDE. * `graphiql_version`: The graphiql version to load. Defaults to **"1.0.3"**. * `graphiql_template`: Inject a Jinja template string to customize GraphiQL. * `graphiql_html_title`: The graphiql title to display. Defaults to **"GraphiQL"**. - * `jinja_env`: Sets jinja environment to be used to process GraphiQL template. If Jinja’s async mode is enabled (by `enable_async=True`), uses + * `jinja_env`: Sets jinja environment to be used to process GraphiQL template. If Jinja’s async mode is enabled (by `enable_async=True`), uses `Template.render_async` instead of `Template.render`. If environment is not set, fallbacks to simple regex-based renderer. * `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)) * `middleware`: A list of graphql [middlewares](http://docs.graphene-python.org/en/latest/execution/middleware/). - * `validation_rules`: A list of graphql validation rules. + * `validation_rules`: A list of graphql validation rules. + * `execution_context_class`: Specifies a custom execution context class. * `max_age`: Sets the response header Access-Control-Max-Age for preflight requests. * `encode`: the encoder to use for responses (sensibly defaults to `graphql_server.json_encode`). * `format_error`: the error formatter to use for responses (sensibly defaults to `graphql_server.default_format_error`. @@ -72,4 +73,4 @@ class UserRootValue(GraphQLView): ``` ## Contributing -See [CONTRIBUTING.md](../CONTRIBUTING.md) \ No newline at end of file +See [CONTRIBUTING.md](../CONTRIBUTING.md) diff --git a/docs/webob.md b/docs/webob.md index 41c0ad1..e652ce0 100644 --- a/docs/webob.md +++ b/docs/webob.md @@ -48,7 +48,8 @@ This will add `/graphql` endpoint to your app and enable the GraphiQL IDE. * `graphiql_html_title`: The graphiql title to display. Defaults to **"GraphiQL"**. * `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)) * `middleware`: A list of graphql [middlewares](http://docs.graphene-python.org/en/latest/execution/middleware/). - * `validation_rules`: A list of graphql validation rules. + * `validation_rules`: A list of graphql validation rules. + * `execution_context_class`: Specifies a custom execution context class. * `encode`: the encoder to use for responses (sensibly defaults to `graphql_server.json_encode`). * `format_error`: the error formatter to use for responses (sensibly defaults to `graphql_server.default_format_error`. * `enable_async`: whether `async` mode will be enabled. @@ -59,4 +60,4 @@ This will add `/graphql` endpoint to your app and enable the GraphiQL IDE. * `should_persist_headers`: An optional boolean which enables to persist headers to storage when true. Defaults to **false**. ## Contributing -See [CONTRIBUTING.md](../CONTRIBUTING.md) \ No newline at end of file +See [CONTRIBUTING.md](../CONTRIBUTING.md) From 888a0936314a93a20a56a87f8237e4fb88adff66 Mon Sep 17 00:00:00 2001 From: Kien Dang Date: Mon, 26 Dec 2022 12:46:11 +0800 Subject: [PATCH 8/9] Update docs --- docs/aiohttp.md | 5 ++--- docs/flask.md | 2 +- docs/sanic.md | 5 ++--- docs/webob.md | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/docs/aiohttp.md b/docs/aiohttp.md index a7dcdd9..e2b676a 100644 --- a/docs/aiohttp.md +++ b/docs/aiohttp.md @@ -52,11 +52,10 @@ gql_view(request) # <-- the instance is callable and expects a `aiohttp.web.Req * `root_value`: The `root_value` you want to provide to graphql `execute`. * `pretty`: Whether or not you want the response to be pretty printed JSON. * `graphiql`: If `True`, may present [GraphiQL](https://github.com/graphql/graphiql) when loaded directly from a browser (a useful tool for debugging and exploration). - * `graphiql_version`: The graphiql version to load. Defaults to **"1.0.3"**. + * `graphiql_version`: The graphiql version to load. Defaults to **"1.4.7"**. * `graphiql_template`: Inject a Jinja template string to customize GraphiQL. * `graphiql_html_title`: The graphiql title to display. Defaults to **"GraphiQL"**. - * `jinja_env`: Sets jinja environment to be used to process GraphiQL template. If Jinja’s async mode is enabled (by `enable_async=True`), uses -`Template.render_async` instead of `Template.render`. If environment is not set, fallbacks to simple regex-based renderer. + * `jinja_env`: Sets jinja environment to be used to process GraphiQL template. If Jinja’s async mode is enabled (by `enable_async=True`), uses `Template.render_async` instead of `Template.render`. If environment is not set, fallbacks to simple regex-based renderer. * `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)) * `middleware`: A list of graphql [middlewares](http://docs.graphene-python.org/en/latest/execution/middleware/). * `validation_rules`: A list of graphql validation rules. diff --git a/docs/flask.md b/docs/flask.md index 4e67015..b4e0e5b 100644 --- a/docs/flask.md +++ b/docs/flask.md @@ -53,7 +53,7 @@ More info at [Graphene v3 release notes](https://github.com/graphql-python/graph * `root_value`: The `root_value` you want to provide to graphql `execute`. * `pretty`: Whether or not you want the response to be pretty printed JSON. * `graphiql`: If `True`, may present [GraphiQL](https://github.com/graphql/graphiql) when loaded directly from a browser (a useful tool for debugging and exploration). - * `graphiql_version`: The graphiql version to load. Defaults to **"1.0.3"**. + * `graphiql_version`: The graphiql version to load. Defaults to **"1.4.7"**. * `graphiql_template`: Inject a Jinja template string to customize GraphiQL. * `graphiql_html_title`: The graphiql title to display. Defaults to **"GraphiQL"**. * `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)) diff --git a/docs/sanic.md b/docs/sanic.md index 1c046f8..8135d8c 100644 --- a/docs/sanic.md +++ b/docs/sanic.md @@ -44,11 +44,10 @@ This will add `/graphql` endpoint to your app and enable the GraphiQL IDE. * `root_value`: The `root_value` you want to provide to graphql `execute`. * `pretty`: Whether or not you want the response to be pretty printed JSON. * `graphiql`: If `True`, may present [GraphiQL](https://github.com/graphql/graphiql) when loaded directly from a browser (a useful tool for debugging and exploration). - * `graphiql_version`: The graphiql version to load. Defaults to **"1.0.3"**. + * `graphiql_version`: The graphiql version to load. Defaults to **"1.4.7"**. * `graphiql_template`: Inject a Jinja template string to customize GraphiQL. * `graphiql_html_title`: The graphiql title to display. Defaults to **"GraphiQL"**. - * `jinja_env`: Sets jinja environment to be used to process GraphiQL template. If Jinja’s async mode is enabled (by `enable_async=True`), uses -`Template.render_async` instead of `Template.render`. If environment is not set, fallbacks to simple regex-based renderer. + * `jinja_env`: Sets jinja environment to be used to process GraphiQL template. If Jinja’s async mode is enabled (by `enable_async=True`), uses `Template.render_async` instead of `Template.render`. If environment is not set, fallbacks to simple regex-based renderer. * `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)) * `middleware`: A list of graphql [middlewares](http://docs.graphene-python.org/en/latest/execution/middleware/). * `validation_rules`: A list of graphql validation rules. diff --git a/docs/webob.md b/docs/webob.md index e652ce0..5288388 100644 --- a/docs/webob.md +++ b/docs/webob.md @@ -43,7 +43,7 @@ This will add `/graphql` endpoint to your app and enable the GraphiQL IDE. * `root_value`: The `root_value` you want to provide to graphql `execute`. * `pretty`: Whether or not you want the response to be pretty printed JSON. * `graphiql`: If `True`, may present [GraphiQL](https://github.com/graphql/graphiql) when loaded directly from a browser (a useful tool for debugging and exploration). - * `graphiql_version`: The graphiql version to load. Defaults to **"1.0.3"**. + * `graphiql_version`: The graphiql version to load. Defaults to **"1.4.7"**. * `graphiql_template`: Inject a Jinja template string to customize GraphiQL. * `graphiql_html_title`: The graphiql title to display. Defaults to **"GraphiQL"**. * `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)) From d66b08e104c639531cc01b549d71827f35741ee5 Mon Sep 17 00:00:00 2001 From: Kien Dang Date: Tue, 27 Dec 2022 12:18:17 +0800 Subject: [PATCH 9/9] Lint --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 992b980..bf3f24f 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,6 @@ from re import search -from setuptools import setup, find_packages + +from setuptools import find_packages, setup install_requires = [ "graphql-core>=3.2,<3.3",