aws-amplify / amplify-codegen

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

Headless support for amplify add codegen #60

Open jonnnnyw opened 5 years ago

jonnnnyw commented 5 years ago

Is your feature request related to a problem? Please describe. I am trying to add multi env support for externally linked APIs but this is currently not possible.

Describe the solution you'd like Headless support for amplify add codegen that lets you pass the codegen config as an argument.

CONFIG="{\
\"generateCode\":true,\
\"codeLanguage\":\"typescript\",\
\"fileNamePattern\":\"src/graphql/**/*.ts\",\
\"generatedFileName\":\"src/API.ts\",\
\"generateDocs\":true\
}"

amplify add codegen --apiId xxxxxxxxxxxxxxxxx --config $CONFIG

Describe alternatives you've considered Add multi env support for externally linked APIs that allows you to link each environment to a specific AppSync ID.

Additional context

khitrenovich commented 4 years ago

Possible duplicate of https://github.com/aws-amplify/amplify-cli/issues/852

tfmorris commented 3 years ago

@khitrenovich It is a duplicate, but that issue was closed without addressing the request.

phani-srikar commented 3 years ago

Hi @tfmorris Thank you for requesting this feature. We will look into this along with #56.

rehrumesh commented 3 years ago

hi @AaronZyLee @phani-srikar Any updates on this?

christo-pr commented 1 year ago

Hi guys!! Any updates on this? I'm using Amplify hosting for my app, and for now the only way to make it work was to include in git all the auto-generated files (aws-exports.js and graphl/ folder) and just build the app instead of amplifyPush --simple.

Worth to mention, I'm only using the codegen tool (no API category attach to my backend env), so if I could run the codegen tool headless would be great!