@@ -13,11 +13,9 @@ const pgConnectionFilterApplyAttribute = EXPORTABLE(
1313 ( isEmpty ) =>
1414 (
1515 PgCondition : GraphileBuild . Build [ "dataplanPg" ] [ "PgCondition" ] ,
16- colSpec : {
17- fieldName : string ;
18- attributeName : string ;
19- attribute : PgCodecAttribute ;
20- } ,
16+ fieldName : string ,
17+ attributeName : string ,
18+ attribute : PgCodecAttribute ,
2119 connectionFilterAllowEmptyObjectInput : boolean | undefined ,
2220 connectionFilterAllowNullInput : boolean | undefined ,
2321 queryBuilder : PgConditionCapableParent ,
@@ -43,7 +41,11 @@ const pgConnectionFilterApplyAttribute = EXPORTABLE(
4341 ) ;
4442 }
4543 const condition = new PgCondition ( queryBuilder ) ;
46- condition . extensions . pgFilterAttribute = colSpec ;
44+ condition . extensions . pgFilterAttribute = {
45+ fieldName,
46+ attributeName,
47+ attribute,
48+ } ;
4749 return condition ;
4850 } ,
4951 [ isEmpty ] ,
@@ -90,7 +92,6 @@ export const PgConnectionArgFilterAttributesPlugin: GraphileConfig.Plugin = {
9092 continue ;
9193 }
9294 const fieldName = inflection . attribute ( { codec, attributeName } ) ;
93- const colSpec = { fieldName, attributeName, attribute } ;
9495 const digest = connectionFilterOperatorsDigest ( attribute . codec ) ;
9596 if ( ! digest ) {
9697 continue ;
@@ -119,9 +120,11 @@ export const PgConnectionArgFilterAttributesPlugin: GraphileConfig.Plugin = {
119120 apply : EXPORTABLE (
120121 (
121122 PgCondition ,
122- colSpec ,
123+ attribute ,
124+ attributeName ,
123125 connectionFilterAllowEmptyObjectInput ,
124126 connectionFilterAllowNullInput ,
127+ fieldName ,
125128 pgConnectionFilterApplyAttribute
126129 ) =>
127130 function (
@@ -130,7 +133,9 @@ export const PgConnectionArgFilterAttributesPlugin: GraphileConfig.Plugin = {
130133 ) {
131134 return pgConnectionFilterApplyAttribute (
132135 PgCondition ,
133- colSpec ,
136+ fieldName ,
137+ attributeName ,
138+ attribute ,
134139 connectionFilterAllowEmptyObjectInput ,
135140 connectionFilterAllowNullInput ,
136141 queryBuilder ,
@@ -139,9 +144,11 @@ export const PgConnectionArgFilterAttributesPlugin: GraphileConfig.Plugin = {
139144 } ,
140145 [
141146 PgCondition ,
142- colSpec ,
147+ attribute ,
148+ attributeName ,
143149 connectionFilterAllowEmptyObjectInput ,
144150 connectionFilterAllowNullInput ,
151+ fieldName ,
145152 pgConnectionFilterApplyAttribute ,
146153 ]
147154 ) ,
0 commit comments