Skip to content

Commit

Permalink
docs: Improved Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
sudokar committed Jul 29, 2023
1 parent 77a93d4 commit e852090
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 9 deletions.
21 changes: 17 additions & 4 deletions API.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 18 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
# cdk-appsync-typescript-resolver

[![npm version](https://badge.fury.io/js/cdk-appsync-typescript-resolver.svg)](https://www.npmjs.com/package/cdk-appsync-typescript-resolver)
[![npm (scoped)](https://img.shields.io/npm/v/cdk-appsync-typescript-resolver)](https://www.npmjs.com/package/cdk-appsync-typescript-resolver)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/73988a5fee2a473a92ea3ecb288dfbc3)](https://app.codacy.com/gh/sudokar/cdk-appsync-typescript-resolver/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/sudokar/cdk-appsync-typescript-resolver/release.yml?branch=main&label=release&style=flat-square)](https://github.com/sudokar/cdk-appsync-typescript-resolver/actions/workflows/release.yml)
[![GitHub release (latest SemVer)](https://img.shields.io/github/release/sudokar/cdk-appsync-typescript-resolver?sort=semver&style=flat-square)](https://github.com/sudokar/cdk-appsync-typescript-resolver/releases)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/sudokar/nx-serverless)
![Maintained](https://img.shields.io/maintenance/yes/2023.svg)
[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod&style=flat-square)](https://gitpod.io/#https://github.com/sudokar/cdk-appsync-typescript-resolver)

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

[![View on Construct Hub](https://constructs.dev/badge?package=cdk-appsync-typescript-resolver)](https://constructs.dev/packages/cdk-appsync-typescript-resolver)

# Highlights
# Constructs

- [AppsyncTypescriptFunction](src%2Flib%2FAppsyncTypescriptFunction.ts) - CDK construct to transpile and bundle Typescript
- [TSExpressPipelineResolver](src%2Flib%2FJSExpressPipelineResolver.ts) - CDK construct to use AppsyncTypescriptFunction with boilerplate code
- [AppsyncTypescriptFunction](src%2Flib%2FAppsyncTypescriptFunction.ts) - To transpile and bundle Typescript
- [TSExpressPipelineResolver](src%2Flib%2FJSExpressPipelineResolver.ts) - To use AppsyncTypescriptFunction with boilerplate code

# 🚀 Usage

Expand Down Expand Up @@ -41,4 +44,14 @@ const resolver = new TSExpressPipelineResolver(testStack, "DemoResolver", {
fieldName: "hello",
tsFunction: new AppsyncTypescriptFunction(...),
});
```
```

> Tip: Use [GraphQL Code Generator](https://the-guild.dev/graphql/codegen) to generate Typescript types from GraphQL schema(s) to use in resolvers
# References

[JavaScript resolvers overview](https://docs.aws.amazon.com/appsync/latest/devguide/resolver-reference-overview-js.html)

[Bundling, TypeScript, and source maps](https://docs.aws.amazon.com/appsync/latest/devguide/resolver-reference-overview-js.html#additional-utilities)

[GraphQL Code Generator](https://the-guild.dev/graphql/codegen)

0 comments on commit e852090

Please sign in to comment.