|
1 | 1 | import inspect
|
2 |
| -from collections import OrderedDict |
3 | 2 |
|
4 |
| -from graphql.execution.executors.sync import SyncExecutor |
| 3 | +from graphql import graphql |
5 | 4 | from graphql.type import GraphQLSchema as _GraphQLSchema
|
6 | 5 | from graphql.utils.introspection_query import introspection_query
|
7 | 6 | from graphql.utils.schema_printer import print_schema
|
@@ -116,10 +115,19 @@ def get_type(self, type_name):
|
116 | 115 | def types(self):
|
117 | 116 | return self._types_names
|
118 | 117 |
|
119 |
| - def execute(self, request='', root=None, args=None, **kwargs): |
120 |
| - kwargs = dict(kwargs, request=request, root=root, args=args, schema=self.schema) |
| 118 | + def execute(self, request_string='', root_value=None, variable_values=None, |
| 119 | + context_value=None, operation_name=None, executor=None): |
| 120 | + kwargs = dict( |
| 121 | + schema=self.schema, |
| 122 | + request_string=request_string, |
| 123 | + root_value=root_value, |
| 124 | + context_value=context_value, |
| 125 | + variable_values=variable_values, |
| 126 | + operation_name=operation_name, |
| 127 | + executor=executor or self._executor |
| 128 | + ) |
121 | 129 | with self.plugins.context_execution(**kwargs) as execute_kwargs:
|
122 |
| - return self.executor.execute(**execute_kwargs) |
| 130 | + return graphql(**execute_kwargs) |
123 | 131 |
|
124 | 132 | def introspect(self):
|
125 |
| - return self.execute(introspection_query).data |
| 133 | + return graphql(self.schema, introspection_query).data |
0 commit comments