Skip to content

Commit 1a9d48c

Browse files
committed
remove double negation
1 parent 6057b2e commit 1a9d48c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

packages/graphql/src/translate/create-update-and-params.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ describe("createUpdateAndParams", () => {
104104
withVars: ["this"],
105105
parameterPrefix: "this",
106106
callbackBucket: new CallbackBucketDeprecated(context),
107+
ignoreOperationAuthorization: false,
107108
});
108109

109110
expect(trimmer(result[0])).toEqual(

packages/graphql/src/translate/translate-update.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export default async function translateUpdate({
6969
const matchPattern = new Cypher.Pattern(matchNode, { labels: node.getLabels(context) });
7070
// bypass auth rules if there's no actual update of properties (connect and disconnect have their own auth rules)
7171
const ignoreOperationAuthorization = updateInput
72-
? !Object.keys(updateInput).some((x) => !node.relationFields.some((field) => field.fieldName === x))
72+
? Object.keys(updateInput).every((x) => node.relationFields.some((field) => field.fieldName === x))
7373
: false;
7474
const topLevelMatch = translateTopLevelMatch({
7575
matchNode,

0 commit comments

Comments
 (0)