Skip to content
Last updated

jsonSamplesDepth

The jsonSamplesDepth option sets the default depth for rendering JSON payload samples for queries and responses. Use this option to set the depth to a comfortable default value for the data structure of your API.

Options

OptionTypeDescription
jsonSamplesDepthnumberSets the default depth for rendering JSON payload samples. Default: 1.

Examples

The following example sets the depth for JSON payload samples to five levels.

redocly.yaml
graphql:
  jsonSamplesDepth: 5

Using this setting, the samples will show up to five levels of nested payload data.

Resources

  • GraphQL - Official GraphQL specification and documentation for understanding query language fundamentals
  • GraphQL configuration - Complete guide to GraphQL configuration options for customizing API reference documentation
  • Samples max inline arguments - Configure the maximum number of inline arguments for samples to complement JSON payload depth settings
  • Field expand level - Set the maximum depth of the Return type in the middle panel for comprehensive data structure display