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

Use maxDepth for specific connection directives in schema for Amplify Codegen

Open oe-bayram opened this issue 4 years ago • 0 comments

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

oe-bayram avatar Sep 27 '21 10:09 oe-bayram