Skip to content

Commit a9765f1

Browse files
committed
the augmented fields need to be thunks as well
1 parent adb856f commit a9765f1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/mutation/mutation.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,18 @@ export function mutationWithClientMutationId(
5858
config: MutationConfig
5959
): GraphQLFieldConfig {
6060
var {name, inputFields, outputFields, mutateAndGetPayload} = config;
61-
var augmentedInputFields = {
61+
var augmentedInputFields = () => ({
6262
...resolveMaybeThunk(inputFields),
6363
clientMutationId: {
6464
type: new GraphQLNonNull(GraphQLString)
6565
}
66-
};
67-
var augmentedOutputFields = {
66+
});
67+
var augmentedOutputFields = () => ({
6868
...resolveMaybeThunk(outputFields),
6969
clientMutationId: {
7070
type: new GraphQLNonNull(GraphQLString)
7171
}
72-
};
72+
});
7373

7474
var outputType = new GraphQLObjectType({
7575
name: name + 'Payload',

0 commit comments

Comments
 (0)