aws-amplify / amplify-codegen

Amplify Codegen is a JavaScript toolkit library for frontend and mobile developers building Amplify applications.
Apache License 2.0
59 stars 59 forks source link

AWS Amplify

Discord Chat build:started

Reporting Bugs/Feature Requests

Open Bugs Feature Requests Enhancements Closed Issues

Amplify Codegen

Amplify Codegen is a JavaScript toolkit library for frontend and mobile developers building amplify applications. Packages are mainly used for frontend code generation including: Package Description
amplify-codegen Amplify plugin for code generation
appsync-modelgen-plugin Model generator for Amplify Datastore
graphql-docs-generator Generates statements from GraphQL schema
graphql-types-generator Generates type annotations from GraphQL schema and statements

Developing

This section should get you running with Amplify Codegen. You will need to set nodejs to a version less than v16 on your system. Developing locally also requires yarn.

Start by Forking the main branch of amplify-codegen.

$ git clone git@github.com:[username]/amplify-codegen.git
$ cd amplify-codegen

$ yarn setup-dev

To generate model files in an Amplify app using the local version of codegen, run amplify-dev codegen models in an Amplify app.

Before pushing code or sending a pull request, do the following:

Troubleshooting

Errors sometimes occur when a different version of amplify-cli-core is installed, typically during the time the CLI is updated. To resolve the error, execute the following command from the top-level directory:

rm -rf yarn.lock && yarn clean && yarn setup-dev

Contributing

See the contribution guideline. https://github.com/aws-amplify/amplify-codegen/blob/main/CONTRIBUTING.md