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 @@ -288,18 +288,20 @@ module.exports = function PostGraphileNestedTypesPlugin(
288
288
} ,
289
289
) ;
290
290
}
291
- pgNestedTableUpdaterFields [ table . id ] [ constraint . id ] . forEach (
292
- ( { field, fieldName : updaterFieldName } ) => {
293
- operations [ updaterFieldName ] = {
294
- description : `The primary key(s) and patch data for \`${ foreignTableName } \` for the far side of the relationship.` ,
295
- type : isForward
296
- ? field
297
- : isUnique
298
- ? field
299
- : new GraphQLList ( new GraphQLNonNull ( field ) ) ,
300
- } ;
301
- } ,
302
- ) ;
291
+ if ( pgNestedTableUpdaterFields [ table . id ] [ constraint . id ] ) {
292
+ pgNestedTableUpdaterFields [ table . id ] [ constraint . id ] . forEach (
293
+ ( { field, fieldName : updaterFieldName } ) => {
294
+ operations [ updaterFieldName ] = {
295
+ description : `The primary key(s) and patch data for \`${ foreignTableName } \` for the far side of the relationship.` ,
296
+ type : isForward
297
+ ? field
298
+ : isUnique
299
+ ? field
300
+ : new GraphQLList ( new GraphQLNonNull ( field ) ) ,
301
+ } ;
302
+ } ,
303
+ ) ;
304
+ }
303
305
if ( creatable ) {
304
306
const createInputType = newWithHooks (
305
307
GraphQLInputObjectType ,
You can’t perform that action at this time.
0 commit comments