@@ -252,8 +252,11 @@ export const PgConnectionArgFilterOperatorsPlugin: GraphileConfig.Plugin = {
252252 [ TYPES ]
253253 ) ,
254254 resolveSqlValue : EXPORTABLE ( ( sql ) => ( ) => sql . null , [ sql ] ) , // do not parse
255- resolve : ( i , _v , $input ) =>
256- sql `${ i } ${ $input . eval ( ) ? sql `IS NULL` : sql `IS NOT NULL` } ` ,
255+ resolve : EXPORTABLE (
256+ ( sql ) => ( i , _v , $input ) =>
257+ sql `${ i } ${ $input . eval ( ) ? sql `IS NULL` : sql `IS NOT NULL` } ` ,
258+ [ sql ]
259+ ) ,
257260 } ,
258261 equalTo : {
259262 description : "Equal to the specified value." ,
@@ -383,7 +386,11 @@ export const PgConnectionArgFilterOperatorsPlugin: GraphileConfig.Plugin = {
383386 notIncludesInsensitive : {
384387 description :
385388 "Does not contain the specified string (case-insensitive)." ,
386- resolveInput : ( input ) => `%${ escapeLikeWildcards ( input ) } %` ,
389+ resolveInput : EXPORTABLE (
390+ ( escapeLikeWildcards ) => ( input ) =>
391+ `%${ escapeLikeWildcards ( input ) } %` ,
392+ [ escapeLikeWildcards ]
393+ ) ,
387394 resolve : EXPORTABLE (
388395 ( sql ) => ( i , v ) => sql `${ i } NOT ILIKE ${ v } ` ,
389396 [ sql ]
@@ -393,7 +400,11 @@ export const PgConnectionArgFilterOperatorsPlugin: GraphileConfig.Plugin = {
393400 } ,
394401 startsWith : {
395402 description : "Starts with the specified string (case-sensitive)." ,
396- resolveInput : ( input ) => `${ escapeLikeWildcards ( input ) } %` ,
403+ resolveInput : EXPORTABLE (
404+ ( escapeLikeWildcards ) => ( input ) =>
405+ `${ escapeLikeWildcards ( input ) } %` ,
406+ [ escapeLikeWildcards ]
407+ ) ,
397408 resolveInputCodec : resolveInputCodecSensitive ,
398409 resolveSqlIdentifier : resolveSqlIdentifierSensitive ,
399410 resolve : EXPORTABLE (
@@ -404,7 +415,11 @@ export const PgConnectionArgFilterOperatorsPlugin: GraphileConfig.Plugin = {
404415 notStartsWith : {
405416 description :
406417 "Does not start with the specified string (case-sensitive)." ,
407- resolveInput : ( input ) => `${ escapeLikeWildcards ( input ) } %` ,
418+ resolveInput : EXPORTABLE (
419+ ( escapeLikeWildcards ) => ( input ) =>
420+ `${ escapeLikeWildcards ( input ) } %` ,
421+ [ escapeLikeWildcards ]
422+ ) ,
408423 resolveInputCodec : resolveInputCodecSensitive ,
409424 resolveSqlIdentifier : resolveSqlIdentifierSensitive ,
410425 resolve : EXPORTABLE (
@@ -415,7 +430,11 @@ export const PgConnectionArgFilterOperatorsPlugin: GraphileConfig.Plugin = {
415430 startsWithInsensitive : {
416431 description :
417432 "Starts with the specified string (case-insensitive)." ,
418- resolveInput : ( input ) => `${ escapeLikeWildcards ( input ) } %` ,
433+ resolveInput : EXPORTABLE (
434+ ( escapeLikeWildcards ) => ( input ) =>
435+ `${ escapeLikeWildcards ( input ) } %` ,
436+ [ escapeLikeWildcards ]
437+ ) ,
419438 resolve : EXPORTABLE (
420439 ( sql ) => ( i , v ) => sql `${ i } ILIKE ${ v } ` ,
421440 [ sql ]
@@ -426,7 +445,11 @@ export const PgConnectionArgFilterOperatorsPlugin: GraphileConfig.Plugin = {
426445 notStartsWithInsensitive : {
427446 description :
428447 "Does not start with the specified string (case-insensitive)." ,
429- resolveInput : ( input ) => `${ escapeLikeWildcards ( input ) } %` ,
448+ resolveInput : EXPORTABLE (
449+ ( escapeLikeWildcards ) => ( input ) =>
450+ `${ escapeLikeWildcards ( input ) } %` ,
451+ [ escapeLikeWildcards ]
452+ ) ,
430453 resolve : EXPORTABLE (
431454 ( sql ) => ( i , v ) => sql `${ i } NOT ILIKE ${ v } ` ,
432455 [ sql ]
@@ -436,7 +459,11 @@ export const PgConnectionArgFilterOperatorsPlugin: GraphileConfig.Plugin = {
436459 } ,
437460 endsWith : {
438461 description : "Ends with the specified string (case-sensitive)." ,
439- resolveInput : ( input ) => `%${ escapeLikeWildcards ( input ) } ` ,
462+ resolveInput : EXPORTABLE (
463+ ( escapeLikeWildcards ) => ( input ) =>
464+ `%${ escapeLikeWildcards ( input ) } ` ,
465+ [ escapeLikeWildcards ]
466+ ) ,
440467 resolveInputCodec : resolveInputCodecSensitive ,
441468 resolveSqlIdentifier : resolveSqlIdentifierSensitive ,
442469 resolve : EXPORTABLE (
@@ -447,7 +474,11 @@ export const PgConnectionArgFilterOperatorsPlugin: GraphileConfig.Plugin = {
447474 notEndsWith : {
448475 description :
449476 "Does not end with the specified string (case-sensitive)." ,
450- resolveInput : ( input ) => `%${ escapeLikeWildcards ( input ) } ` ,
477+ resolveInput : EXPORTABLE (
478+ ( escapeLikeWildcards ) => ( input ) =>
479+ `%${ escapeLikeWildcards ( input ) } ` ,
480+ [ escapeLikeWildcards ]
481+ ) ,
451482 resolveInputCodec : resolveInputCodecSensitive ,
452483 resolveSqlIdentifier : resolveSqlIdentifierSensitive ,
453484 resolve : EXPORTABLE (
@@ -457,7 +488,11 @@ export const PgConnectionArgFilterOperatorsPlugin: GraphileConfig.Plugin = {
457488 } ,
458489 endsWithInsensitive : {
459490 description : "Ends with the specified string (case-insensitive)." ,
460- resolveInput : ( input ) => `%${ escapeLikeWildcards ( input ) } ` ,
491+ resolveInput : EXPORTABLE (
492+ ( escapeLikeWildcards ) => ( input ) =>
493+ `%${ escapeLikeWildcards ( input ) } ` ,
494+ [ escapeLikeWildcards ]
495+ ) ,
461496 resolve : EXPORTABLE (
462497 ( sql ) => ( i , v ) => sql `${ i } ILIKE ${ v } ` ,
463498 [ sql ]
@@ -468,7 +503,11 @@ export const PgConnectionArgFilterOperatorsPlugin: GraphileConfig.Plugin = {
468503 notEndsWithInsensitive : {
469504 description :
470505 "Does not end with the specified string (case-insensitive)." ,
471- resolveInput : ( input ) => `%${ escapeLikeWildcards ( input ) } ` ,
506+ resolveInput : EXPORTABLE (
507+ ( escapeLikeWildcards ) => ( input ) =>
508+ `%${ escapeLikeWildcards ( input ) } ` ,
509+ [ escapeLikeWildcards ]
510+ ) ,
472511 resolve : EXPORTABLE (
473512 ( sql ) => ( i , v ) => sql `${ i } NOT ILIKE ${ v } ` ,
474513 [ sql ]
@@ -517,16 +556,19 @@ export const PgConnectionArgFilterOperatorsPlugin: GraphileConfig.Plugin = {
517556 resolveSqlIdentifier : resolveSqlIdentifierInsensitive ,
518557 } ,
519558 } ;
520- const resolveTextArrayInputCodec = ( ) =>
521- listOfCodec ( TYPES . text , { extensions : { listItemNonNull : true } } ) ;
559+ const resolveTextArrayInputCodec = EXPORTABLE (
560+ ( TYPES , listOfCodec ) => ( ) =>
561+ listOfCodec ( TYPES . text , { extensions : { listItemNonNull : true } } ) ,
562+ [ TYPES , listOfCodec ]
563+ ) ;
522564 const hstoreOperators : { [ fieldName : string ] : OperatorSpec } = {
523565 contains : {
524566 description : "Contains the specified KeyValueHash." ,
525567 resolve : EXPORTABLE ( ( sql ) => ( i , v ) => sql `${ i } @> ${ v } ` , [ sql ] ) ,
526568 } ,
527569 containsKey : {
528570 description : "Contains the specified key." ,
529- resolveInputCodec : ( ) => TYPES . text ,
571+ resolveInputCodec : EXPORTABLE ( ( TYPES ) => ( ) => TYPES . text , [ TYPES ] ) ,
530572 resolve : EXPORTABLE ( ( sql ) => ( i , v ) => sql `${ i } ? ${ v } ` , [ sql ] ) ,
531573 } ,
532574 containsAllKeys : {
@@ -555,7 +597,7 @@ export const PgConnectionArgFilterOperatorsPlugin: GraphileConfig.Plugin = {
555597 } ,
556598 containsKey : {
557599 description : "Contains the specified key." ,
558- resolveInputCodec : ( ) => TYPES . text ,
600+ resolveInputCodec : EXPORTABLE ( ( TYPES ) => ( ) => TYPES . text , [ TYPES ] ) ,
559601 resolve : EXPORTABLE ( ( sql ) => ( i , v ) => sql `${ i } ? ${ v } ` , [ sql ] ) ,
560602 } ,
561603 containsAllKeys : {
0 commit comments