{"id":21977641,"url":"https://github.com/tkasuz/appsyncgen","last_synced_at":"2025-03-23T00:25:49.708Z","repository":{"id":65536808,"uuid":"594075483","full_name":"tkasuz/appsyncgen","owner":"tkasuz","description":"appsyncgen is a CLI for generating AWS AppSync JavaScript Resolvers based on Amazon DynamoDB single-table design.","archived":false,"fork":false,"pushed_at":"2023-02-22T17:47:45.000Z","size":50,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-28T03:42:35.834Z","etag":null,"topics":["appsync","cli","dynamodb","graphql","javascript"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tkasuz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-27T14:44:48.000Z","updated_at":"2023-05-16T03:27:07.000Z","dependencies_parsed_at":"2024-06-20T11:54:20.802Z","dependency_job_id":"4496e265-40e1-4664-b0b4-8af2de6691da","html_url":"https://github.com/tkasuz/appsyncgen","commit_stats":null,"previous_names":["tkasuz/appsyncgen","kopkunka55/appsyncgen"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkasuz%2Fappsyncgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkasuz%2Fappsyncgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkasuz%2Fappsyncgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkasuz%2Fappsyncgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tkasuz","download_url":"https://codeload.github.com/tkasuz/appsyncgen/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245039740,"owners_count":20551290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["appsync","cli","dynamodb","graphql","javascript"],"created_at":"2024-11-29T16:16:02.372Z","updated_at":"2025-03-23T00:25:49.673Z","avatar_url":"https://github.com/tkasuz.png","language":"Go","readme":"# appsyncgen [![Go Report Card](https://goreportcard.com/badge/github.com/kopkunka55/appsyncgen)](https://goreportcard.com/report/github.com/kopkunka55/appsyncgen) [![Go Reference](https://pkg.go.dev/badge/github.com/kopkunka55/appsyncgen.svg)](https://pkg.go.dev/github.com/kopkunka55/appsyncgen) [![lint status](https://github.com/kopkunka55/appsyncgen/workflows/lint/badge.svg)](https://github.com/kopkunka55/appsyncgen/actions)\n\nappsyncgen is a CLI for generating AWS AppSync JavaScript Resolvers based on Amazon DynamoDB single-table design.\n\nappsyncgen is inspired by [AWS Amplify CLI](https://docs.amplify.aws/cli/)\n\n## Overview\n\nappsyncgen is a CLI providing some useful capability to develop GraphQL API with AppSync JavaScript Resolver using Amazon DynamoDB single table.\n\n**appsyncgen** provides:\n\n* Generate JS resolvers from `schema.graphql`.\n* Support some directive supported by AWS Amplify (`@auth`, `@hasOne`, `@hasMany`, `@manyToMany`).\n* `@auth` directive supports multiple providers (`apiKey`, `oidc`, `iam`, `lambda`, `userPools`) which provide resolver-level authorization.\n* Export resolver list by JSON so that you can easily implement CDK stack.\n* Generate CloudFormation Template automatically.\n* Generate Pipeline resolvers for your queries and mutations so that you can slot in your custom business logic between generated resolvers.\n* Optimistic locking with version number for update resolver\n* **TypeScript** support is coming soon.\n\n## Concepts\n\n[AWS Amplify CLI](https://docs.amplify.aws/cli/) is really powerful tool to generate AppSync resolvers using multi-table Amazon DynamoDB, but sometimes building complicated logic is not easy with VTL. **appsyncgen** helps us generate **JavaScript** Resolver, which should make it easier to edit auto-generated code. Additionally **appsyncgen** generate resolvers based on Amazon DynamoDB [single-table design](https://aws.amazon.com/blogs/compute/creating-a-single-table-design-with-amazon-dynamodb/), so that you don't need to consider DynamoDB key design by yourself.\n\n## Installing\n```shell\ngo install github.com/kopkunka55/appsyncgen@latest\n```\n\n### For Mac OS\n```shell\nbrew tap kopkunka55/appsyncgen\nbrew install kopkunka55/appsyncgen/appsyncgen\n```\n\n## Usage\nAll you need is `schema.graphql` which includes only basic types. Mutation/Query/Subscription and some supplemental types will be added.\n\n```graphql\ntype Message\n@auth (rules: [\n    {provider: apiKey},\n])\n{\n    body: String!\n    from: User! @hasOne\n}\n\nenum Role {\n  ADMIN\n  READER\n  EDITOR\n}\n\ntype User\n@auth (rules: [\n    {provider: apiKey, operations: [create, update, delete, read]},\n])\n{\n    name: String!\n    chats: [Chat]! @manyToMany\n    profilePicture: String\n    roles: Role!\n}\n\ntype Chat\n@auth (rules: [\n    {provider: apiKey}\n])\n{\n    name: String!\n    members: [User] @manyToMany\n    messages: [Message] @hasMany\n}\n```\n\n```shell\nappsyncgen generate --output='./resolvers' --schema='./schema.graphql' --name='appsyncgen'\n```\n\n## License\n\nThe source code for the site is licensed under the MIT license, which you can find in the [LICENSE](./LICENSE) file.\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkasuz%2Fappsyncgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftkasuz%2Fappsyncgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkasuz%2Fappsyncgen/lists"}