From 9c869589e9cb8d0e61769b40633ba2fd3d9d06fc Mon Sep 17 00:00:00 2001 From: Josue Ruiz <7465495+SwaySway@users.noreply.github.com> Date: Wed, 27 Oct 2021 13:03:29 -0700 Subject: [PATCH] fix: use userpoolid as indicator for addAwsIamAuthInOutputSchema (#8570) --- .../src/graphql-transformer/transform-graphql-schema.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/amplify-provider-awscloudformation/src/graphql-transformer/transform-graphql-schema.ts b/packages/amplify-provider-awscloudformation/src/graphql-transformer/transform-graphql-schema.ts index 6fcbca8e5f6..c9c06eca13d 100644 --- a/packages/amplify-provider-awscloudformation/src/graphql-transformer/transform-graphql-schema.ts +++ b/packages/amplify-provider-awscloudformation/src/graphql-transformer/transform-graphql-schema.ts @@ -90,7 +90,11 @@ function getTransformerFactory( const modelTransformer = new ModelTransformer(); const indexTransformer = new IndexTransformer(); const hasOneTransformer = new HasOneTransformer(); - const authTransformer = new AuthTransformer({ authConfig: options?.authConfig, addAwsIamAuthInOutputSchema: false, adminUserPoolID }); + const authTransformer = new AuthTransformer({ + authConfig: options?.authConfig, + addAwsIamAuthInOutputSchema: !!adminUserPoolID, + adminUserPoolID, + }); const transformerList: TransformerPluginProvider[] = [ modelTransformer, new FunctionTransformer(),