Skip to content

Commit

Permalink
Adds @aws_lambda directive
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilkisiela authored Sep 27, 2021
1 parent f16a163 commit 6a7ad78
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- **core**: BREAKING - `diff` is now async
- **core**: Adds `considerUsage` rule
- **core**: Fixes missing names of default root types
- **cli**, **ci**: Adds `@aws_lambda` directive

### v2.9.0

Expand Down
8 changes: 3 additions & 5 deletions packages/core/__tests__/validate/aws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('aws', () => {

const schema = await new LoadersRegistry().loadSchema(
/* GraphQL */ `
type AWS_Data {
type AWS_Data @aws_lambda {
normalScalar: String
date: AWSDate!
time: AWSTime!
Expand All @@ -43,17 +43,15 @@ describe('aws', () => {
}
type Query {
data: AWS_Data
data: AWS_Data @aws_lambda
}
`,
{},
false,
true,
);

const results = validate(schema, [new Source(print(doc))], {
// aws: true,
});
const results = validate(schema, [new Source(print(doc))]);

expect(results).toHaveLength(0);
});
Expand Down
1 change: 1 addition & 0 deletions packages/loaders/loaders/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export class LoadersRegistry {
directive @aws_cognito_user_pools(
cognito_groups: [String!]
) on FIELD_DEFINITION | OBJECT
directive @aws_lambda on FIELD_DEFINITION | OBJECT
`),
],
}
Expand Down

1 comment on commit 6a7ad78

@vercel
Copy link

@vercel vercel bot commented on 6a7ad78 Sep 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.