Skip to content

allow execution options passthrough #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions aiohttp_graphql/graphqlview.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def __init__(
encoder=None,
error_formatter=None,
enable_async=True,
**execution_options,
):
# pylint: disable=too-many-arguments
# pylint: disable=too-many-locals
Expand All @@ -58,6 +59,7 @@ def __init__(
self.executor,
AsyncioExecutor,
)
self.execution_options = execution_options
assert isinstance(self.schema, GraphQLSchema), \
'A Schema is required to be provided to GraphQLView.'

Expand Down Expand Up @@ -141,6 +143,7 @@ async def __call__(self, request):
context_value=self.get_context(request),
middleware=self.middleware,
executor=self.executor,
**self.execution_options,
)

awaited_execution_results = await Promise.all(execution_results)
Expand Down