Skip to content

Commit 2c08dd8

Browse files
committed
Allow to pass through execution options (#10)
1 parent 2ef1cac commit 2c08dd8

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

MANIFEST.in

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ include .flake8
77
include .pylintrc
88

99
include tox.ini
10+
include travis.yml
1011

1112
graft aiohttp_graphql
1213
graft tests

aiohttp_graphql/graphqlview.py

+3
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def __init__(
3535
encoder=None,
3636
error_formatter=None,
3737
enable_async=True,
38+
**execution_options,
3839
):
3940
# pylint: disable=too-many-arguments
4041
# pylint: disable=too-many-locals
@@ -54,6 +55,7 @@ def __init__(
5455
self.encoder = encoder or json_encode
5556
self.error_formatter = error_formatter or default_format_error
5657
self.enable_async = enable_async and isinstance(self.executor, AsyncioExecutor)
58+
self.execution_options = execution_options
5759
assert isinstance(
5860
self.schema, GraphQLSchema
5961
), "A Schema is required to be provided to GraphQLView."
@@ -140,6 +142,7 @@ async def __call__(self, request):
140142
context_value=self.get_context(request),
141143
middleware=self.middleware,
142144
executor=self.executor,
145+
**self.execution_options,
143146
)
144147

145148
if is_graphiql and self.enable_async:

0 commit comments

Comments
 (0)