Skip to content

Commit

Permalink
feat: add @aws_lambda to GQL transformer pass through directive list (#…
Browse files Browse the repository at this point in the history
…7757)

Updated GraphQL transformer to pass through @aws_lambda directive to output schema
  • Loading branch information
yuth authored Jul 20, 2021
1 parent d90edec commit 509dfd1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/graphql-transformer-core/src/GraphQLTransform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions packages/graphql-transformer-core/src/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 509dfd1

Please sign in to comment.