Skip to content

Commit 65f14b6

Browse files
committed
More autofixes
1 parent ea6d806 commit 65f14b6

2 files changed

Lines changed: 8 additions & 12 deletions

File tree

src/PgConnectionArgFilterLogicalOperatorsPlugin.ts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,14 @@ export const PgConnectionArgFilterLogicalOperatorsPlugin: GraphileConfig.Plugin
4141
description: `Checks for all expressions in this list.`,
4242
type: new GraphQLList(new GraphQLNonNull(Self)),
4343
applyPlan: EXPORTABLE(
44-
() =>
45-
function ($where: PgConditionStep<any>, fieldArgs) {
44+
(assertAllowed) => function ($where: PgConditionStep<any>, fieldArgs) {
4645
assertAllowed(fieldArgs, "list");
4746
const $and = $where.andPlan();
4847
// No need for this more correct form, easier to read if it's flatter.
4948
// fieldArgs.apply(() => $and.andPlan());
5049
fieldArgs.apply($and);
5150
},
52-
[]
51+
[assertAllowed]
5352
),
5453
}
5554
),
@@ -62,14 +61,13 @@ export const PgConnectionArgFilterLogicalOperatorsPlugin: GraphileConfig.Plugin
6261
description: `Checks for any expressions in this list.`,
6362
type: new GraphQLList(new GraphQLNonNull(Self)),
6463
applyPlan: EXPORTABLE(
65-
() =>
66-
function ($where: PgConditionStep<any>, fieldArgs) {
64+
(assertAllowed) => function ($where: PgConditionStep<any>, fieldArgs) {
6765
assertAllowed(fieldArgs, "list");
6866
const $or = $where.orPlan();
6967
// Every entry is added to the `$or`, but the entries themselves should use an `and`.
7068
fieldArgs.apply(() => $or.andPlan());
7169
},
72-
[]
70+
[assertAllowed]
7371
),
7472
}
7573
),
@@ -82,14 +80,13 @@ export const PgConnectionArgFilterLogicalOperatorsPlugin: GraphileConfig.Plugin
8280
description: `Negates the expression.`,
8381
type: Self,
8482
applyPlan: EXPORTABLE(
85-
() =>
86-
function ($where: PgConditionStep<any>, fieldArgs) {
83+
(assertAllowed) => function ($where: PgConditionStep<any>, fieldArgs) {
8784
assertAllowed(fieldArgs, "object");
8885
const $not = $where.notPlan();
8986
const $and = $not.andPlan();
9087
fieldArgs.apply($and);
9188
},
92-
[]
89+
[assertAllowed]
9390
),
9491
}
9592
),

src/PgConnectionArgFilterPlugin.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -446,8 +446,7 @@ export const PgConnectionArgFilterPlugin: GraphileConfig.Plugin = {
446446
}
447447

448448
const assertAllowed = EXPORTABLE(
449-
() =>
450-
function (fieldArgs: FieldArgs) {
449+
(connectionFilterAllowEmptyObjectInput, connectionFilterAllowNullInput) => function (fieldArgs: FieldArgs) {
451450
const $raw = fieldArgs.getRaw();
452451
if (
453452
!connectionFilterAllowEmptyObjectInput &&
@@ -474,7 +473,7 @@ export const PgConnectionArgFilterPlugin: GraphileConfig.Plugin = {
474473
);
475474
}
476475
},
477-
[]
476+
[connectionFilterAllowEmptyObjectInput, connectionFilterAllowNullInput]
478477
);
479478

480479
const attributeCodec =

0 commit comments

Comments
 (0)