Skip to content

Commit

Permalink
fix(appsync): remove 'id' suffix to union definition key (#17787)
Browse files Browse the repository at this point in the history
Removing an unnecessary suffix from union definitions.

Fixes: #17771 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
BryanPan342 authored Dec 6, 2021
1 parent cd8a377 commit 86e7780
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-appsync/lib/schema-intermediate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ export class UnionType implements IIntermediateType {
if (options.field && !(options.field.intermediateType instanceof ObjectType)) {
throw new Error('Fields for Union Types must be Object Types.');
}
this.definition[options.field?.toString() + 'id'] = options.field;
this.definition[options.field.toString()] = options.field;
}

/**
Expand Down

0 comments on commit 86e7780

Please sign in to comment.