amplify-cli icon indicating copy to clipboard operation
amplify-cli copied to clipboard

Using "amplify api gql-compile" and "amplify codegen" without "amplify init"

Open ChrisWun opened this issue 8 years ago • 2 comments

** Which Category is your question related to? ** Feature Request / Usage

** What AWS Services are you utilizing? ** AWS Appsync

** Provide additional details e.g. code snippets ** The AWS Amplify CLI can be used to define a GraphQL API. It is also possible to generate Resolvers, a CloudFormation Template and Typescript Types for a defined schema in schema.graphql.

I'd like to use these features without an initialized amplify Project. Something like amplify api gql-compile --schema <path to schema.graphql> --output <path to output folder for Resolvers and CloudFormation Template> and amplify codegen --schema <path to schema.graphql> --output <path to output folder for generated Code>

Is this possible?

My current workaround is to move the generated files back and forth between a demo project (where amplifiy is initialized) and the target project.

ChrisWun avatar Oct 08 '18 11:10 ChrisWun

We recommend to use the Amplify CLI only on initialized projects, even if hacks like this might work in certain, it's not guaranteed to work for feature updates.

UnleashedMind avatar Oct 08 '18 22:10 UnleashedMind

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.

github-actions[bot] avatar May 27 '21 18:05 github-actions[bot]