0.0.29 • Published 3 months ago

cdk-appsync-typescript-resolver v0.0.29

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 months ago

cdk-appsync-typescript-resolver

npm (scoped) Codacy Badge GitHub Workflow Status (branch) GitHub release (latest SemVer) License PRs Welcome Maintained Gitpod ready-to-code

Constructs to transpile and bundle Typescript to valid AWS Appsync's JS resolvers

View on Construct Hub

✨ Constructs

🚀 Usage

  • TypescriptUnitResolver
import { TypescriptUnitResolver } from 'cdk-appsync-typescript-resolver'

const resolver = new TypescriptUnitResolver(stack, "DemoResolver", {
    api: new appsync.GraphqlApi(...),
    typeName: "Query",
    fieldName: "hello",
    path: path.join(__dirname, "path", "to", "file.ts"),
    sourceMap: true,
});
  • 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,
});

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

JavaScript resolvers overview

Bundling, TypeScript, and source maps

GraphQL Code Generator

0.0.29

3 months ago

0.0.28

7 months ago

0.0.26

8 months ago

0.0.27

8 months ago

0.0.25

1 year ago

0.0.24

1 year ago

0.0.23

1 year ago

0.0.22

2 years ago

0.0.21

2 years ago

0.0.20

2 years ago

0.0.19

2 years ago

0.0.18

2 years ago

0.0.17

2 years ago

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago

0.0.1-alpha1

2 years ago