Skip to content

feat(appsync): support Input Types for code-first approach#10024

Merged
mergify[bot] merged 6 commits intoaws:masterfrom
BryanPan342:input
Aug 31, 2020
Merged

feat(appsync): support Input Types for code-first approach#10024
mergify[bot] merged 6 commits intoaws:masterfrom
BryanPan342:input

Conversation

@BryanPan342
Copy link
Copy Markdown
Contributor

@BryanPan342 BryanPan342 commented Aug 27, 2020

Support Input Types for code-first approach. Input Types are special types of Intermediate Types in CDK.

Desired GraphQL Input Type
input Review {
  stars: Int!
  commentary: String
}

The above GraphQL Input Type can be expressed in CDK as the following:

CDK Code
const review = new appsync.InputType('Review', {
  definition: {
    stars: GraphqlType.int({ isRequired: true }),
    commentary: GraphqlType.string(),
  },
}); 
api.addType(review);

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@BryanPan342 BryanPan342 self-assigned this Aug 27, 2020
@BryanPan342 BryanPan342 added the @aws-cdk/aws-appsync Related to AWS AppSync label Aug 27, 2020
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Aug 27, 2020
@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: cfeceb3
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Copy link
Copy Markdown
Contributor

@MrArnoldPalmer MrArnoldPalmer left a comment

Choose a reason for hiding this comment

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

👍👍

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Aug 31, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 3f80ae6 into aws:master Aug 31, 2020
@BryanPan342 BryanPan342 deleted the input branch September 8, 2020 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

@aws-cdk/aws-appsync Related to AWS AppSync contribution/core This is a PR that came from AWS.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants