aws-amplify / aws-amplify/amplify-codegen
Confusion about max-depth and custom graphql types
- Dominant language
- TypeScript
- Stars
- 59
- Forks
- 64
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I'm a bit confused over the expected functionality of `codegen --max-depth` and custom types. I found this issue (https://github.com/aws-amplify/amplify-cli/issues/1064) and this PR (https://github.com/aws-amplify/amplify-cli/pull/1068) and wondered if this related so `S3Object` types?
If you create the schema from the following snippet below which is from your docs, the generated `ListTodos` would not include `file` in the `items` with the default max depth of 2. This is because `codegen` does not include `file` for `ListTodos` but it does include it for the singular `GetTodo` query. Is this correct or should the `codegen` command be including `file` for the `ListTodos` collection query?
**Which Category is your question related to?**
codegen
**Amplify CLI Version**
6.3.1
**What AWS Services are you utilizing?**
AppSync, S3
**Provide additional details e.g. code snippets**
```
type Todo @model {
id: ID!
name: String!
description: String!
file: S3Object
}
type S3Object {
bucket: String!
key: String!
region: String!
}
```
Contributor guide
Assessment
This issue has not been assessed yet.