We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 99af55c commit 0b0b075Copy full SHA for 0b0b075
packages/appsync-modelgen-plugin/src/visitors/appsync-visitor.ts
@@ -726,7 +726,10 @@ export class AppSyncModelVisitor<
726
Object.values(this.modelMap).forEach(model => {
727
model.fields.forEach(field => {
728
const connectionInfo = field.connectionInfo;
729
- if (connectionInfo?.kind === CodeGenConnectionType.BELONGS_TO && connectionInfo.targetName !== 'id') {
+ if (connectionInfo
730
+ && connectionInfo.kind !== CodeGenConnectionType.HAS_MANY
731
+ && connectionInfo.kind !== CodeGenConnectionType.HAS_ONE
732
+ && connectionInfo.targetName !== 'id') {
733
// Need to remove the field that is targetName
734
removeFieldFromModel(model, connectionInfo.targetName);
735
}
0 commit comments