Skip to content

Commit

Permalink
Don't overwrite real fields when mutation argument is the same (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
alecrae committed May 4, 2020
1 parent 6819c3e commit 21de5cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fake_schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ export const fakeFieldResolver: GraphQLFieldResolver<unknown, unknown> = async (
if (isMutation && isCompositeReturn && isPlainObject(resolved)) {
const inputArg = args['input'];
return {
...resolved,
...(
Object.keys(args).length === 1 && isPlainObject(inputArg)
? inputArg
: args
),
...resolved
};
}

Expand Down

0 comments on commit 21de5cc

Please sign in to comment.