amplify-codegen
amplify-codegen copied to clipboard
Use maxDepth for specific connection directives in schema for Amplify Codegen
Is this related to a new or existing Amplify category?
api
Is this related to another service?
No response
Describe the feature you'd like to request
For the generation of types one can set maxDepth for all connection directives. But on the one hand this is not necessary for all connection fields and on the other hand we need some fields to be set with more depth.
It would be great to have the option to set the maxDepth specifically for a connection field.
Other connection fields not set specifically can take the default value set in .graphqlconfig.yml
Describe the solution you'd like
Option to set the maxDepth specifically for a connection field like:
orderPositions: [OrderPosition!]! @connection(keyName: "orderPositionsByOrder", fields: ["id"], maxDepth: 6)
Describe alternatives you've considered
Define custom types for each connection field.
Additional context
No response
Is this something that you'd be interested in working on?
- [ ] 👋 I may be able to implement this feature request
- [ ] ⚠️ This feature might incur a breaking change