File tree 1 file changed +1
-6
lines changed
1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change 1
1
from graphql .error import format_error as format_graphql_error
2
2
from graphql .error import GraphQLError
3
- from graphql .pyutils import is_awaitable
4
3
5
4
from graphene .types .schema import Schema
6
5
@@ -32,14 +31,10 @@ def format_result(self, result):
32
31
33
32
def execute (self , * args , ** kwargs ):
34
33
executed = self .schema .execute (* args , ** dict (self .execute_options , ** kwargs ))
35
- if is_awaitable (executed ):
36
- executed = asyncio .run (executed )
37
34
38
35
return self .format_result (executed )
39
36
40
37
async def execute_async (self , * args , ** kwargs ):
41
- executed = self .schema .execute (* args , ** dict (self .execute_options , ** kwargs ))
42
- if is_awaitable (executed ):
43
- executed = await executed
38
+ executed = await self .schema .execute_async (* args , ** dict (self .execute_options , ** kwargs ))
44
39
45
40
return self .format_result (executed )
You can’t perform that action at this time.
0 commit comments