aws-amplify / aws-amplify/amplify-codegen
amplify codegen generates empty API.ts and non-typescript operation files in github actions workflow
- Dominant language
- TypeScript
- Stars
- 59
- Forks
- 64
- PR merge metrics
- No merged PRs in 30d
Description
### Before opening, please confirm:
- [X] I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-cli/issues?q=is%3Aissue+).
- [X] I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-cli/blob/master/CONTRIBUTING.md#bug-reports).
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- [X] I have removed any sensitive information from my code snippets and submission.
### How did you install the Amplify CLI?
yarn global add @aws-amplify/cli
### If applicable, what version of Node.js are you using?
14.17.4
### Amplify CLI Version
8.3.0
### What operating system are you using?
Windows
### Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No manual changes made
### Amplify Categories
Not applicable
### Amplify Commands
codegen
### Describe the bug
Running amplify codegen on my local machine works fine, `API.ts` is generated non-empty and `mutations.ts`, `queries.ts`, `subscriptions.ts` are generated as well.
However, when running on Github Actions workflow, the `API.ts` generated is empty and the files generated are in graphql format.


Here is my .graphqlconfig.yml:

This configuration is used on my local machine and its generating the correct files and `API.ts` isn't empty. But on Github Actions the result is different.
### Expected behavior
Expect `API.ts` to be non-empty with all types declared, and query/mutation/subscription files to be in `.ts` format.
### Reproduction steps
On Github actions workflow:
1. yarn global add @aws-amplify/cli
2. amplify codegen --nodownload
### GraphQL schema(s)
_No response_
### Log output
_No response_
### Additional information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.