@aws-cdk/aws-appsync-alpha: Generate TypeScript type definitions when using code-first schema approach
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Description
When using the code-first schema approach, it would be very helpful if CDK could generate TypeScript type definitions to match the generated GraphQL types, similar to how [GraphQL Nexus](https://nexusjs.org) does it.
### Use Case
This would be especially useful with Lambda data sources, since currently types need to be manually defined in order to use `AppSyncResolverHandler` and/or `AppSyncResolverEvent` typings from the `@types/aws-lambda` package.
### Proposed Solution
Similar to GraphQL Nexus, CDK could generate an e.g. `appsync.d.ts` file in the root of the project. And maybe the output path could be customized in `cdk.json` context.
### Other information
_No response_
### Acknowledge
- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
Contributor guide
Research direction
Start by reviewing the @aws-cdk/aws-appsync-alpha code-first schema implementation and how cdk.json context is handled. Compare the desired generated declarations with GraphQL Nexus and define the output-path behavior and generated types that would count as done.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, graphql, typescript
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100