Skip to content

Commit fdb3032

Browse files
authored
Accept custom middleware on experimental executor
Other option would be making middleware verification that happens on #L47[https://github.com/graphql-python/graphql-core/blob/features/next-query-builder/graphql/execution/executor.py#L47] before calling the experimental executor on #L36[https://github.com/graphql-python/graphql-core/blob/features/next-query-builder/graphql/execution/executor.py#L36]
1 parent acfb2c0 commit fdb3032

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

graphql/execution/experimental/executor.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ def execute(schema, document_ast, root_value=None, context_value=None,
1616
'not multiple versions of GraphQL installed in your node_modules directory.'
1717
)
1818
if middleware:
19+
if not isinstance(middleware, MiddlewareManager):
20+
middleware = MiddlewareManager(*middleware)
21+
1922
assert isinstance(middleware, MiddlewareManager), (
2023
'middlewares have to be an instance'
2124
' of MiddlewareManager. Received "{}".'.format(middleware)

0 commit comments

Comments
 (0)