Skip to content

Commit 427d32d

Browse files
committed
added context param to mutation resolve
1 parent 977cbae commit 427d32d

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/mutation/mutation.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,12 @@ export function mutationWithClientMutationId(
8686
args: {
8787
input: {type: new GraphQLNonNull(inputType)}
8888
},
89-
resolve: (_, {input}, info) => {
90-
return Promise.resolve(mutateAndGetPayload(input, info)).then(payload => {
91-
payload.clientMutationId = input.clientMutationId;
92-
return payload;
93-
});
89+
resolve: (_, {input}, context, info) => {
90+
return Promise.resolve(mutateAndGetPayload(input, context, info))
91+
.then(payload => {
92+
payload.clientMutationId = input.clientMutationId;
93+
return payload;
94+
});
9495
}
9596
};
9697
}

0 commit comments

Comments
 (0)