File tree 1 file changed +8
-6
lines changed 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -24,17 +24,19 @@ def get_operation_root_type(
24
24
"Schema does not define the required query root type." , operation
25
25
)
26
26
return query_type
27
- elif operation_type == OperationType .MUTATION :
27
+
28
+ if operation_type == OperationType .MUTATION :
28
29
mutation_type = schema .mutation_type
29
30
if not mutation_type :
30
31
raise GraphQLError ("Schema is not configured for mutations." , operation )
31
32
return mutation_type
32
- elif operation_type == OperationType .SUBSCRIPTION :
33
+
34
+ if operation_type == OperationType .SUBSCRIPTION :
33
35
subscription_type = schema .subscription_type
34
36
if not subscription_type :
35
37
raise GraphQLError ("Schema is not configured for subscriptions." , operation )
36
38
return subscription_type
37
- else :
38
- raise GraphQLError (
39
- "Can only have query, mutation and subscription operations." , operation
40
- )
39
+
40
+ raise GraphQLError (
41
+ "Can only have query, mutation and subscription operations." , operation
42
+ )
You can’t perform that action at this time.
0 commit comments