feat(appsync): code-first schema allows for object type definition#9417
feat(appsync): code-first schema allows for object type definition#9417mergify[bot] merged 47 commits intoaws:masterfrom
Conversation
|
[TODO]
|
|
|
||
| ```ts | ||
| import * as appsync from '@aws-cdk/aws-appsync'; | ||
| import * as db from '@aws-cdk/aws-dynamodb'; |
There was a problem hiding this comment.
| import * as db from '@aws-cdk/aws-dynamodb'; | |
| import * as ddb from '@aws-cdk/aws-dynamodb'; |
| }, | ||
| }); | ||
|
|
||
| const demoTable = new db.Table(stack, 'DemoTable', { |
There was a problem hiding this comment.
| const demoTable = new db.Table(stack, 'DemoTable', { | |
| const demoTable = new ddb.Table(stack, 'DemoTable', { |
| const demoTable = new db.Table(stack, 'DemoTable', { | ||
| partitionKey: { | ||
| name: 'id', | ||
| type: db.AttributeType.STRING, |
There was a problem hiding this comment.
| type: db.AttributeType.STRING, | |
| type: ddb.AttributeType.STRING, |
| const api = new appsync.GraphQLApi(stack, 'Api', { | ||
| name: 'demo', | ||
| schemaDefinition: appsync.SchemaDefinition.FILE, | ||
| schemaDefinitionFile: join(__dirname, 'schema.graphql'), |
There was a problem hiding this comment.
might want to provide an example that includes that this file contains
|
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). |
|
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). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
@Mergifyio refresh |
|
Command |
AppSync now able to generate a code-first approach to generating object and interface types through code. You can also append to schema through the
GraphQLApi.appendToSchemafunction.Feature List:
All details can be found in the README.md
Fixes #9307
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license