aws-amplify / aws-amplify/amplify-codegen
S3Object Fragment preventing Codegen after 12.4.0 and preventing Amplify libraries upgrade
- 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-codegen/issues?q=is%3Aissue+).
- [x] I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-codegen/blob/main/CONTRIBUTING.md#bugs).
- [x] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
### How did you install the Amplify CLI?
npm
### If applicable, what version of Node.js are you using?
v16.20.2
### Amplify CLI Version
12.4.0
### What operating system are you using?
Mac
### Amplify Codegen Command
codegen
### Describe the bug
Re-opening the issue raised in #764
The issue with S3Object is blocking our project from migrating to new Amplify libraries on iOS. There's a few issues:
- Unable to run codegen beyond v12.4.0 due to the S3Object
- But we cannot remove S3Object from schema or rename it because that would break the schema for the currently released app.
- We cannot upgrade to the new Amplify libraries from AWSAppsyncClient because autogenerated API.swift file references Classes in the AWSAppsyncClient pod. These references are related to the way amplify codegen handles S3Object meant to be used with the AWSAppsyncClient on iOS
This leaves us in a really challenging situation as we are required to start using Xcode 16 by April but Xcode 16 does not work with the old AWS iOS libraries
### Expected behavior
Either new amplify versions should allow us to handle codegen with S3Object and it should not treat S3Object in a special way, or it should allow us to run codegen but not generate an API.swift file that references old libraries
### Reproduction steps
use S3Object in the schema as defined in the old amplify documentation
run amplify codegen on new version of amplify
or on 12.4.0, run codegen and place the API.swift file into an XCode project with the new Amplify libraries instead of the old ios sdks
### GraphQL schema(s)
```graphql
# Put schemas below this line
type S3Object {
bucket: String!
region: String!
key: String!
}
input S3ObjectInput {
bucket: String!
region: String!
key: String!
mimeType: String!
localUri: String!
}
```
### Log output
```
# Put your logs below this line
```
### Additional information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.