feat(appsync): support union types for code-first approach#10025
feat(appsync): support union types for code-first approach#10025mergify[bot] merged 20 commits intoaws:masterfrom
Conversation
…asing" This reverts commit f3c77e3.
shivlaks
left a comment
There was a problem hiding this comment.
nice work! some minor suggestions to take a look at before we can merge this one.
| const out = 'type Test1 {\n test1: String\n}\ntype Test2 {\n test2: String\n}\nunion UnionTest = Test1 | Test2\n'; | ||
| const test1 = new appsync.ObjectType('Test1', { | ||
| definition: { test1: t.string }, | ||
| }); | ||
| const test2 = new appsync.ObjectType('Test2', { | ||
| definition: { test2: t.string }, | ||
| }); | ||
| let stack: cdk.Stack; | ||
| let api: appsync.GraphqlApi; |
There was a problem hiding this comment.
why not put all of this into a beforeAll() ?
There was a problem hiding this comment.
is there a difference between giving it global scope and using beforeAll()?
There was a problem hiding this comment.
since i dont have any asynchronous code before the testing I think it's okay to put it in global scope. wdyt?
|
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 |
|
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). |
Support
Union Typesfor code-first approach.Union Typesare special types of Intermediate Types in CDK.Desired GraphQL Union Type
The above GraphQL Union Type can be expressed in CDK as the following:
CDK Code
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license