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

Headless support for amplify add codegen

Open jonnnnyw opened this issue 6 years ago • 5 comments

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

jonnnnyw avatar Aug 09 '19 06:08 jonnnnyw

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

khitrenovich avatar Jan 21 '20 23:01 khitrenovich

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

tfmorris avatar Dec 18 '20 19:12 tfmorris

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

phani-srikar avatar Feb 10 '21 04:02 phani-srikar

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

rehrumesh avatar Mar 12 '21 02:03 rehrumesh

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!

christo-pr avatar Feb 09 '23 21:02 christo-pr