diff --git a/packages/graphql-transformer-core/src/GraphQLTransform.ts b/packages/graphql-transformer-core/src/GraphQLTransform.ts index 51c8c3d99ad..b44cc25bcb5 100644 --- a/packages/graphql-transformer-core/src/GraphQLTransform.ts +++ b/packages/graphql-transformer-core/src/GraphQLTransform.ts @@ -234,6 +234,7 @@ export class GraphQLTransform { aws_api_key: true, aws_iam: true, aws_oidc: true, + aws_lambda: true, aws_cognito_user_pools: true, deprecated: true, }); diff --git a/packages/graphql-transformer-core/src/TransformFormatter.ts b/packages/graphql-transformer-core/src/TransformFormatter.ts index c199d93cc01..746a10037da 100644 --- a/packages/graphql-transformer-core/src/TransformFormatter.ts +++ b/packages/graphql-transformer-core/src/TransformFormatter.ts @@ -96,7 +96,7 @@ export class TransformFormatter { kind: 'Document', definitions: Object.keys(ctx.nodeMap).map((k: string) => ctx.getType(k)), }, - ['aws_subscribe', 'aws_auth', 'aws_api_key', 'aws_iam', 'aws_oidc', 'aws_cognito_user_pools', 'deprecated'] + ['aws_subscribe', 'aws_auth', 'aws_api_key', 'aws_iam', 'aws_oidc', 'aws_cognito_user_pools', 'aws_lambda', 'deprecated'], ); const SDL = print(astSansDirectives); return SDL; diff --git a/packages/graphql-transformer-core/src/validation.ts b/packages/graphql-transformer-core/src/validation.ts index 4e94fd7b6e4..f35712f54c7 100644 --- a/packages/graphql-transformer-core/src/validation.ts +++ b/packages/graphql-transformer-core/src/validation.ts @@ -109,6 +109,7 @@ directive @aws_api_key on FIELD_DEFINITION | OBJECT directive @aws_iam on FIELD_DEFINITION | OBJECT directive @aws_oidc on FIELD_DEFINITION | OBJECT directive @aws_cognito_user_pools(cognito_groups: [String!]) on FIELD_DEFINITION | OBJECT +directive @aws_lambda on FIELD_DEFINITION | OBJECT # Allows transformer libraries to deprecate directive arguments. directive @deprecated(reason: String) on FIELD_DEFINITION | INPUT_FIELD_DEFINITION | ENUM | ENUM_VALUE