File tree Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -264,18 +264,20 @@ module.exports = function PostGraphileNestedTypesPlugin(
264
264
type : GraphQLBoolean ,
265
265
} ;
266
266
}
267
- pgNestedTableConnectorFields [ foreignTable . id ] . forEach (
268
- ( { field, fieldName : connectorFieldName } ) => {
269
- operations [ connectorFieldName ] = {
270
- description : `The primary key(s) for \`${ foreignTableName } \` for the far side of the relationship.` ,
271
- type : isForward
272
- ? field
273
- : isUnique
274
- ? field
275
- : new GraphQLList ( new GraphQLNonNull ( field ) ) ,
276
- } ;
277
- } ,
278
- ) ;
267
+ if ( pgNestedTableConnectorFields [ foreignTable . id ] ) {
268
+ pgNestedTableConnectorFields [ foreignTable . id ] . forEach (
269
+ ( { field, fieldName : connectorFieldName } ) => {
270
+ operations [ connectorFieldName ] = {
271
+ description : `The primary key(s) for \`${ foreignTableName } \` for the far side of the relationship.` ,
272
+ type : isForward
273
+ ? field
274
+ : isUnique
275
+ ? field
276
+ : new GraphQLList ( new GraphQLNonNull ( field ) ) ,
277
+ } ;
278
+ } ,
279
+ ) ;
280
+ }
279
281
if ( deleteable ) {
280
282
pgNestedTableDeleterFields [ foreignTable . id ] . forEach (
281
283
( { field, fieldName : deleterFieldName } ) => {
You can’t perform that action at this time.
0 commit comments