File tree 1 file changed +2
-14
lines changed
src/graphql_relay/mutation
1 file changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -80,13 +80,7 @@ def augmented_output_fields() -> GraphQLFieldMap:
80
80
# noinspection PyShadowingBuiltins
81
81
async def resolve (_root : Any , info : GraphQLResolveInfo , input : Dict ) -> Any :
82
82
payload = await mutate_and_get_payload (info , ** input )
83
- try :
84
- clientMutationId = input ["clientMutationId" ]
85
- except KeyError :
86
- raise GraphQLError (
87
- "Cannot set clientMutationId"
88
- f" in the payload object { inspect (payload )} ."
89
- )
83
+ clientMutationId = input .get ("clientMutationId" )
90
84
if payload is None :
91
85
payload = NullResult (clientMutationId )
92
86
else :
@@ -100,13 +94,7 @@ def resolve( # type: ignore
100
94
_root : Any , info : GraphQLResolveInfo , input : Dict
101
95
) -> Any :
102
96
payload = mutate_and_get_payload (info , ** input )
103
- try :
104
- clientMutationId = input ["clientMutationId" ]
105
- except KeyError :
106
- raise GraphQLError (
107
- "Cannot set clientMutationId"
108
- f" in the payload object { inspect (payload )} ."
109
- )
97
+ clientMutationId = input .get ("clientMutationId" )
110
98
if payload is None :
111
99
payload = NullResult (clientMutationId )
112
100
else :
You can’t perform that action at this time.
0 commit comments