Skip to content

Commit 0ab92dc

Browse files
committed
Fix: For an optional hasone, generated field should be optional
1 parent 9716c47 commit 0ab92dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/appsync-modelgen-plugin/src/visitors/appsync-visitor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ export class AppSyncModelVisitor<
691691
directives: [],
692692
type: 'ID',
693693
isList: false,
694-
isNullable: connectionInfo.associatedWith.isNullable,
694+
isNullable: field.isNullable,
695695
});
696696
} else if (connectionInfo.targetName !== 'id') {
697697
// Need to remove the field that is targetName

0 commit comments

Comments
 (0)