From 772036f9fd1dce2d4e557812b93e62337ff3d5f6 Mon Sep 17 00:00:00 2001 From: Bryan Pan Date: Mon, 6 Dec 2021 11:07:35 -0800 Subject: [PATCH] fix(appsync): remove 'id' suffix to union definition key (#17787) 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* --- packages/@aws-cdk/aws-appsync/lib/schema-intermediate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-appsync/lib/schema-intermediate.ts b/packages/@aws-cdk/aws-appsync/lib/schema-intermediate.ts index 6236a00ce1803..a661d4e4baf61 100644 --- a/packages/@aws-cdk/aws-appsync/lib/schema-intermediate.ts +++ b/packages/@aws-cdk/aws-appsync/lib/schema-intermediate.ts @@ -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; } /**