Skip to content

Commit

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

Fixes: aws#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 and TikiTDO committed Feb 21, 2022
1 parent 47ec87a commit 772036f
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 772036f

Please sign in to comment.