Skip to content

Commit d170f65

Browse files
committed
Better names
1 parent 9359b33 commit d170f65

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

src/PgConnectionArgFilterComputedAttributesPlugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const pgConnectionFilterApplyComputedAttribute = EXPORTABLE(
4343
return $col;
4444
},
4545
[],
46-
"pgConnectionFilterApplyComputedAttribute "
46+
"pgConnectionFilterApplyComputedAttribute"
4747
);
4848

4949
export const PgConnectionArgFilterComputedAttributesPlugin: GraphileConfig.Plugin =

src/PgConnectionArgFilterOperatorsPlugin.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ export const PgConnectionArgFilterOperatorsPlugin: GraphileConfig.Plugin = {
724724
},
725725
};
726726
for (const key in hstoreOperators) {
727-
hstoreOperators[key].name ??= key;
727+
hstoreOperators[key].name ??= `hstore${key}`;
728728
}
729729

730730
const jsonbOperators: { [fieldName: string]: OperatorSpec } = {
@@ -779,7 +779,7 @@ export const PgConnectionArgFilterOperatorsPlugin: GraphileConfig.Plugin = {
779779
},
780780
};
781781
for (const key in jsonbOperators) {
782-
jsonbOperators[key].name ??= key;
782+
jsonbOperators[key].name ??= `jsonb${key}`;
783783
}
784784

785785
const inetOperators: { [fieldName: string]: OperatorSpec } = {
@@ -827,7 +827,7 @@ export const PgConnectionArgFilterOperatorsPlugin: GraphileConfig.Plugin = {
827827
},
828828
};
829829
for (const key in inetOperators) {
830-
inetOperators[key].name ??= key;
830+
inetOperators[key].name ??= `inet${key}`;
831831
}
832832

833833
const insensitiveOperators: { [fieldName: string]: OperatorSpec } = {};
@@ -942,15 +942,13 @@ export const PgConnectionArgFilterOperatorsPlugin: GraphileConfig.Plugin = {
942942

943943
insensitiveOperators[`${name}Insensitive`] = {
944944
...spec,
945+
name: `${name}Insensitive`,
945946
description,
946947
resolveInputCodec,
947948
resolveSqlIdentifier,
948949
resolveSqlValue,
949950
};
950951
}
951-
for (const key in insensitiveOperators) {
952-
insensitiveOperators[key].name ??= key;
953-
}
954952

955953
const connectionFilterEnumOperators = {
956954
...standardOperators,
@@ -1050,7 +1048,7 @@ export const PgConnectionArgFilterOperatorsPlugin: GraphileConfig.Plugin = {
10501048
},
10511049
};
10521050
for (const key in connectionFilterRangeOperators) {
1053-
connectionFilterRangeOperators[key].name ??= key;
1051+
connectionFilterRangeOperators[key].name ??= `range${key}`;
10541052
}
10551053

10561054
const connectionFilterArrayOperators: {
@@ -1150,7 +1148,7 @@ export const PgConnectionArgFilterOperatorsPlugin: GraphileConfig.Plugin = {
11501148
},
11511149
};
11521150
for (const key in connectionFilterArrayOperators) {
1153-
connectionFilterArrayOperators[key].name ??= key;
1151+
connectionFilterArrayOperators[key].name ??= `array${key}`;
11541152
}
11551153

11561154
const {

0 commit comments

Comments
 (0)