0.0.25 • Published 2 months ago
cdk-appsync-typescript-resolver v0.0.25
cdk-appsync-typescript-resolver
Constructs to transpile and bundle Typescript to valid AWS Appsync's JS resolvers
✨ Constructs
- AppsyncTypescriptFunction - To transpile and bundle Typescript
- TSExpressPipelineResolver - To use AppsyncTypescriptFunction with boilerplate code
🚀 Usage
- AppsyncTypescriptFunction
import { AppsyncTypescriptFunction } from 'cdk-appsync-typescript-resolver'
...
const appsyncFunction = new AppsyncTypescriptFunction(stack, "TSDemoFunction", {
name: "TSDemoFunction",
api: new appsync.GraphqlApi(...),
path: path.join(__dirname, "path", "to", "file.ts"),
dataSource: new appsync.DynamoDbDataSource(...),
sourceMap: true,
});
- TSExpressPipelineResolver
import { TSExpressPipelineResolver } from 'cdk-appsync-typescript-resolver'
...
const resolver = new TSExpressPipelineResolver(testStack, "DemoResolver", {
api: new appsync.GraphqlApi(...),
typeName: "Query",
fieldName: "hello",
tsFunction: new AppsyncTypescriptFunction(...),
});
Tip: Use GraphQL Code Generator to generate Typescript types from GraphQL schema(s) to use in resolvers
Checkout the demo project for examples cdk-appsync-typescript-resolver-demo
References
0.0.25
2 months ago
0.0.24
3 months ago
0.0.23
3 months ago
0.0.22
8 months ago
0.0.21
8 months ago
0.0.20
9 months ago
0.0.19
9 months ago
0.0.18
9 months ago
0.0.17
9 months ago
0.0.16
9 months ago
0.0.15
9 months ago
0.0.14
9 months ago
0.0.12
9 months ago
0.0.11
9 months ago
0.0.10
9 months ago
0.0.9
9 months ago
0.0.8
9 months ago
0.0.7
9 months ago
0.0.6
10 months ago
0.0.5
10 months ago
0.0.4
10 months ago
0.0.3
10 months ago
0.0.2
10 months ago
0.0.1
10 months ago
0.0.0
10 months ago
0.0.1-alpha1
10 months ago