Type object
File match apollo-router-*.json
Schema URL https://catalog.lintel.tools/schemas/schemastore/apollo-router/latest.json
Source https://www.schemastore.org/apollo-router-2.9.0.json

Versions

Validate with Lintel

npx @lintel/lintel check
Type: object

The configuration for the router.

Can be created through serde::Deserialize from various formats, or inline in Rust code with serde_json::json! and serde_json::from_value.

Properties

health_check object

Configuration options pertaining to the health component.

4 nested properties
listen

The socket address and port to listen on Defaults to 127.0.0.1:8088

Default: "127.0.0.1:8088"
All of: ListenAddr string | string
enabled boolean

Set to false to disable the health check

Default: true
path string

Optionally set a custom healthcheck path Defaults to /health

Default: "/health"
readiness

Optionally specify readiness configuration

Default:
{
  "interval": {
    "sampling": "5s",
    "unready": null
  },
  "allowed": 100
}
All of: ReadinessConfig object
sandbox

Sandbox configuration

Default:
{
  "enabled": false
}
All of: Sandbox object
homepage

Homepage configuration

Default:
{
  "enabled": true,
  "graph_ref": null
}
All of: Homepage object
server

Configuration for the server

Default:
{
  "http": {
    "header_read_timeout": {
      "secs": 10,
      "nanos": 0
    }
  }
}
All of: Server object
supergraph

Configuration for the supergraph

Default:
{
  "listen": "127.0.0.1:4000",
  "connection_shutdown_timeout": {
    "secs": 60,
    "nanos": 0
  },
  "path": "/",
  "introspection": false,
  "generate_query_fragments": true,
  "defer_support": true,
  "query_planning": {
    "cache": {
      "in_memory": {
        "limit": 512
      },
      "redis": null
    },
    "warmed_up_queries": null,
    "experimental_plans_limit": null,
    "experimental_paths_limit": null,
    "experimental_reuse_query_plans": false,
    "experimental_cooperative_cancellation": {
      "enabled": true,
      "mode": "measure",
      "timeout": null
    }
  },
  "early_cancel": false,
  "enable_result_coercion_errors": false,
  "experimental_log_on_broken_pipe": false
}
All of: Supergraph object
cors

Cross origin request headers.

Default:
{
  "allow_any_origin": false,
  "allow_credentials": false,
  "allow_headers": [],
  "expose_headers": null,
  "methods": [
    "GET",
    "POST",
    "OPTIONS"
  ],
  "max_age": null,
  "policies": [
    {
      "allow_credentials": null,
      "allow_headers": [],
      "expose_headers": [],
      "match_origins": [],
      "max_age": null,
      "methods": [
        "GET",
        "POST",
        "OPTIONS"
      ],
      "origins": [
        "https://studio.apollographql.com"
      ],
      "private_network_access": null
    }
  ]
}
All of: Cors object
tls
Default:
{
  "supergraph": null,
  "subgraph": {
    "all": {
      "certificate_authorities": null,
      "client_authentication": null
    },
    "subgraphs": {}
  },
  "connector": {
    "sources": {},
    "all": {
      "certificate_authorities": null,
      "client_authentication": null
    }
  }
}
All of: Tls object
apq

Configures automatic persisted queries

Default:
{
  "enabled": true,
  "router": {
    "cache": {
      "in_memory": {
        "limit": 512
      },
      "redis": null
    }
  },
  "subgraph": {
    "all": {
      "enabled": false
    },
    "subgraphs": {}
  }
}
All of: Apq object
persisted_queries

Configures managed persisted queries

Default:
{
  "enabled": false,
  "log_unknown": false,
  "safelist": {
    "enabled": false,
    "require_id": false
  },
  "experimental_prewarm_query_plan_cache": {
    "on_startup": false,
    "on_reload": true
  },
  "local_manifests": null,
  "hot_reload": false
}
All of: PersistedQueries object
limits object

Configuration for operation limits, parser limits, HTTP limits, etc.

12 nested properties
max_depth integer | null

If set, requests with operations deeper than this maximum are rejected with a HTTP 400 Bad Request response and GraphQL error with "extensions": {"code": "MAX_DEPTH_LIMIT"}

Counts depth of an operation, looking at its selection sets,˛ including fields in fragments and inline fragments. The following example has a depth of 3.

query getProduct {
  book { # 1
    ...bookDetails
  }
}

fragment bookDetails on Book {
  details { # 2
    ... on ProductDetailsBook {
      country # 3
    }
  }
}
Default: null
format=uint32min=0
max_height integer | null

If set, requests with operations higher than this maximum are rejected with a HTTP 400 Bad Request response and GraphQL error with "extensions": {"code": "MAX_DEPTH_LIMIT"}

Height is based on simple merging of fields using the same name or alias, but only within the same selection set. For example name here is only counted once and the query has height 3, not 4:

query {
    name { first }
    name { last }
}

This may change in a future version of Apollo Router to do full field merging across fragments instead.

Default: null
format=uint32min=0
max_root_fields integer | null

If set, requests with operations with more root fields than this maximum are rejected with a HTTP 400 Bad Request response and GraphQL error with "extensions": {"code": "MAX_ROOT_FIELDS_LIMIT"}

This limit counts only the top level fields in a selection set, including fragments and inline fragments.

Default: null
format=uint32min=0
max_aliases integer | null

If set, requests with operations with more aliases than this maximum are rejected with a HTTP 400 Bad Request response and GraphQL error with "extensions": {"code": "MAX_ALIASES_LIMIT"}

Default: null
format=uint32min=0
warn_only boolean

If set to true (which is the default is dev mode), requests that exceed a max_* limit are not rejected. Instead they are executed normally, and a warning is logged.

Default: false
parser_max_recursion integer

Limit recursion in the GraphQL parser to protect against stack overflow. default: 500

Default: 500
format=uintmin=0
parser_max_tokens integer

Limit the number of tokens the GraphQL parser processes before aborting.

Default: 15000
format=uintmin=0
http_max_request_bytes integer

Limit the size of incoming HTTP requests read from the network, to protect against running out of memory. Default: 2000000 (2 MB)

Default: 2000000
format=uintmin=0
http1_max_request_headers integer | null

Limit the maximum number of headers of incoming HTTP1 requests. Default is 100.

If router receives more headers than the buffer size, it responds to the client with "431 Request Header Fields Too Large".

Default: null
format=uintmin=0
http1_max_request_buf_size string | null

Limit the maximum buffer size for the HTTP1 connection.

Default is ~400kib.

Default: null
http2_max_headers_list_bytes string | null

For HTTP2, limit the header list to a threshold of bytes. Default is 16kb.

If router receives more headers than allowed size of the header list, it responds to the client with "431 Request Header Fields Too Large".

Default: null
introspection_max_depth boolean

Limit the depth of nested list fields in introspection queries to protect avoid generating huge responses. Returns a GraphQL error with { message: "Maximum introspection depth exceeded" } when nested fields exceed the limit. Default: true

Default: true
experimental_chaos

Configuration for chaos testing, trying to reproduce bugs that require uncommon conditions. You probably don’t want this in production!

Default:
{
  "force_schema_reload": null,
  "force_config_reload": null
}
All of: Config object
plugins

Plugin configuration

Default: null
All of: Plugins object
authentication object

Authentication

3 nested properties

Router configuration

Subgraph configuration

Connector configuration

authorization object

Authorization plugin

2 nested properties
require_authentication boolean

Reject unauthenticated requests

Default: false
directives

@authenticated, @requiresScopes and @policy directives

connectors object
8 nested properties
subgraphs Record<string, object>

A map of subgraph name to connectors config for that subgraph

Default:
{}
sources Record<string, object>

Map of subgraph_name.connector_source_name to source configuration

Default:
{}
debug_extensions boolean

Enables connector debugging information on response extensions if the feature is enabled

Default: false
max_requests_per_operation_per_source integer | null

The maximum number of requests for a connector source

Default: null
format=uintmin=0
expose_sources_in_context boolean

When enabled, adds an entry to the context for use in coprocessors

{
  "context": {
    "entries": {
      "apollo_connectors::sources_in_query_plan": [
        { "subgraph_name": "subgraph", "source_name": "source" }
      ]
    }
  }
}
Default: false
preview_connect_v0_2 boolean | null

Enables Connect spec v0.2 during the preview.

Default: null
preview_connect_v0_3 boolean | null

Feature gate for Connect spec v0.3. Set to true to enable the using the v0.3 spec during the preview phase.

Default: null
preview_connect_v0_4 boolean | null

Feature gate for Connect spec v0.3. Set to true to enable the using the v0.3 spec during the preview phase.

Default: null
coprocessor object

Configures the externalization plugin

8 nested properties
url string required

The url you'd like to offload processing to (can be overridden per-stage)

client Client | null
timeout string

The timeout for external requests

Default:
{
  "secs": 1,
  "nanos": 0
}
response_validation boolean

Response validation defaults to true

Default: true
router

The router stage request/response configuration

All of: RouterStage object
supergraph

The supergraph stage request/response configuration

All of: SupergraphStage object
execution

The execution stage request/response configuration

All of: ExecutionStage object
subgraph

The subgraph stage request/response configuration

All of: SubgraphStages object
csrf object

CSRF protection configuration.

See https://owasp.org/www-community/attacks/csrf for an explanation on CSRF attacks.

2 nested properties
unsafe_disabled boolean

The CSRF plugin is enabled by default.

Setting unsafe_disabled: true disables CSRF protection.

Default: false
required_headers string[]

Override the headers to check for by setting custom_headers Note that if you set required_headers here, you may also want to have a look at your CORS configuration, and make sure you either:

  • did not set any allow_headers list (so it defaults to mirror_request)
  • added your required headers to the allow_headers list, as shown in the examples/cors-and-csrf/custom-headers.router.yaml files.
Default:
[
  "x-apollo-operation-name",
  "apollo-require-preflight"
]
demand_control object

Demand control configuration

3 nested properties
enabled boolean required

Enable demand control

mode required

The mode that the demand control plugin should operate in.

  • Measure: The plugin will measure the cost of incoming requests but not reject them.
  • Enforce: The plugin will enforce the cost of incoming requests and reject them if the algorithm indicates that they should be rejected.
All of: Mode2 string
strategy required

The strategy used to reject requests.

All of: StrategyConfig object
enhanced_client_awareness object

The enhanced client-awareness plugin has no configuration.

experimental_diagnostics object

Configuration for the diagnostics plugin

Platform Requirements: This plugin is supported on all platforms. Heap dump functionality is only available on Linux platforms due to jemalloc requirements. Other diagnostic features work across platforms.

3 nested properties
enabled boolean

Enable the diagnostics plugin

Default: false
listen

The socket address and port to listen on Defaults to 127.0.0.1:8089 Do not expose this endpoint to the internet as it exposes sensitive information.

Default: "127.0.0.1:8089"
All of: ListenAddr string | string
output_directory string

Directory path for memory dump files Defaults to "/tmp/router-diagnostics" on Unix, or temp directory on other platforms

This directory will be created automatically if it doesn't exist. Note: Memory dumps are only generated on Linux platforms.

Default: "/tmp/router-diagnostics"
fleet_detector object

The fleet detector plugin has no configuration.

forbid_mutations boolean

Forbid mutations configuration

headers object

Configuration for header propagation

3 nested properties
all HeadersLocation | null

Rules to apply to all subgraphs

subgraphs Record<string, object>

Rules to specific subgraphs

connector

Rules for connectors

include_subgraph_errors object

Configuration for exposing errors that originate from subgraphs

2 nested properties
all

Global configuration for error redaction. Applies to all subgraphs.

Default: false
All of: ErrorMode boolean | object | object
subgraphs Record<string, boolean | object | object | object>

Overrides global configuration on a per-subgraph basis

Default:
{}
license_enforcement object

The license enforcement plugin has no configuration.

override_subgraph_url object

Subgraph URL mappings

preview_entity_cache object

Configuration for entity caching

5 nested properties
subgraph required

Configure invalidation per subgraph

enabled boolean

Enable or disable the entity caching feature

Default: false
expose_keys_in_context boolean

Expose cache keys in context

Default: false
invalidation InvalidationEndpointConfig | null

Global invalidation configuration

metrics

Entity caching evaluation metrics

All of: Metrics object
preview_file_uploads object

Configuration for File Uploads plugin

2 nested properties
enabled boolean required

Whether the file upload plugin should be enabled (default: false)

protocols required

Supported protocol configurations for file uploads

All of: FileUploadProtocols object
progressive_override object

Configuration for the progressive override plugin

rhai object

Configuration for the Rhai Plugin

2 nested properties
scripts string | null

The directory where Rhai scripts can be found

main string | null

The main entry point for Rhai script evaluation

subscription object

Subscriptions configuration

5 nested properties
enabled boolean

Enable subscription

Default: true
mode

Select a subscription mode (callback or passthrough)

Default:
{
  "callback": null,
  "passthrough": null
}
All of: SubscriptionModeConfig object
deduplication

Configure subgraph subscription deduplication

Default:
{
  "enabled": true,
  "ignored_headers": []
}
All of: DeduplicationConfig object
max_opened_subscriptions integer | null

This is a limit to only have maximum X opened subscriptions at the same time. By default if it's not set there is no limit.

Default: null
format=uintmin=0
queue_capacity integer | null

It represent the capacity of the in memory queue to know how many events we can keep in a buffer

Default: null
format=uintmin=0
telemetry object

Telemetry configuration

3 nested properties
apollo

Apollo reporting configuration

All of: ApolloTelemetryConfig object
exporters

Instrumentation configuration

All of: Exporters object
instrumentation

Instrumentation configuration

All of: Instrumentation object
traffic_shaping object

Configuration for the traffic shaping plugin

5 nested properties
router RouterShaping | null

Applied at the router level

all SubgraphShaping | null

Applied on all subgraphs

subgraphs Record<string, object>

Applied on specific subgraphs

connector

Applied on specific subgraphs

All of: ConnectorsShapingConfig object
deduplicate_variables boolean | null

DEPRECATED, now always enabled: Enable variable deduplication optimization when sending requests to subgraphs (https://github.com/apollographql/router/issues/87)

Default: null
batching

Batching configuration.

Default:
{
  "enabled": false,
  "mode": "batch_http_link",
  "subgraph": null,
  "maximum_size": null
}
All of: Batching object
experimental_type_conditioned_fetching boolean

Type conditioned fetching configuration.

Default: false

Definitions

HealthCheckConfig object

Configuration options pertaining to the health component.

listen

The socket address and port to listen on Defaults to 127.0.0.1:8088

Default: "127.0.0.1:8088"
All of: ListenAddr string | string
enabled boolean

Set to false to disable the health check

Default: true
path string

Optionally set a custom healthcheck path Defaults to /health

Default: "/health"
readiness

Optionally specify readiness configuration

Default:
{
  "interval": {
    "sampling": "5s",
    "unready": null
  },
  "allowed": 100
}
All of: ReadinessConfig object
ListenAddr string | string

Listening address.

ReadinessConfig object

Configuration options pertaining to the readiness health sub-component.

interval

The readiness interval configuration

Default:
{
  "sampling": "5s",
  "unready": null
}
All of: ReadinessIntervalConfig object
allowed integer

How many rejections are allowed in an interval (default: 100) If this number is exceeded, the router will start to report unready.

Default: 100
format=uintmin=0
ReadinessIntervalConfig object

Configuration options pertaining to the readiness health interval sub-component.

sampling string | null

The sampling interval (default: 5s)

Default: "0s"
unready string | null

The unready interval (default: 2 * sampling interval)

Default: null
Sandbox object

Configuration options pertaining to the sandbox page.

enabled boolean

Set to true to enable sandbox

Default: false
Homepage object

Configuration options pertaining to the home page.

enabled boolean

Set to false to disable the homepage

Default: true
graph_ref string | null

Graph reference This will allow you to redirect from the Apollo Router landing page back to Apollo Studio Explorer

Default: null
Server object
http

The server http configuration

Default:
{
  "header_read_timeout": {
    "secs": 10,
    "nanos": 0
  }
}
All of: ServerHttpConfig object
ServerHttpConfig object

Configuration for HTTP

header_read_timeout string

Header read timeout in human-readable format; defaults to 10s

Default:
{
  "secs": 10,
  "nanos": 0
}
Supergraph object

Configuration options pertaining to the supergraph server component.

listen

The socket address and port to listen on Defaults to 127.0.0.1:4000

Default: "127.0.0.1:4000"
All of: ListenAddr string | string
connection_shutdown_timeout string

The timeout for shutting down connections during a router shutdown or a schema reload.

Default:
{
  "secs": 60,
  "nanos": 0
}
path string

The HTTP path on which GraphQL requests will be served. default: "/"

Default: "/"
introspection boolean

Enable introspection Default: false

Default: false
generate_query_fragments boolean

Enable QP generation of fragments for subgraph requests Default: true

Default: true
defer_support boolean

Set to false to disable defer support

Default: true
query_planning

Query planning options

Default:
{
  "cache": {
    "in_memory": {
      "limit": 512
    },
    "redis": null
  },
  "warmed_up_queries": null,
  "experimental_plans_limit": null,
  "experimental_paths_limit": null,
  "experimental_reuse_query_plans": false,
  "experimental_cooperative_cancellation": {
    "enabled": true,
    "mode": "measure",
    "timeout": null
  }
}
All of: QueryPlanning object
early_cancel boolean

abort request handling when the client drops the connection. Default: false. When set to true, some parts of the request pipeline like telemetry will not work properly, but request handling will stop immediately when the client connection is closed.

Default: false
enable_result_coercion_errors boolean

Enable errors generated during response reformatting and result coercion to be returned in responses. Default: false All subgraph responses are checked and corrected to ensure alignment with the schema and query. When enabled, misaligned values will generate errors which are included in errors array in the response.

Default: false
experimental_log_on_broken_pipe boolean

Log a message if the client closes the connection before the response is sent. Default: false.

Default: false
QueryPlanning object

Query planning cache configuration

cache

Cache configuration

Default:
{
  "in_memory": {
    "limit": 512
  },
  "redis": null
}
All of: QueryPlanCache object
warmed_up_queries integer | null

Warms up the cache on reloads by running the query plan over a list of the most used queries (from the in memory cache) Configures the number of queries warmed up. Defaults to 1/3 of the in memory cache

Default: null
format=uintmin=0
experimental_plans_limit integer | null

Sets a limit to the number of generated query plans. The planning process generates many different query plans as it explores the graph, and the list can grow large. By using this limit, we prevent that growth and still get a valid query plan, but it may not be the optimal one.

The default limit is set to 10000, but it may change in the future

Default: null
format=uint32min=0
experimental_paths_limit integer | null

Before creating query plans, for each path of fields in the query we compute all the possible options to traverse that path via the subgraphs. Multiple options can arise because fields in the path can be provided by multiple subgraphs, and abstract types (i.e. unions and interfaces) returned by fields sometimes require the query planner to traverse through each constituent object type. The number of options generated in this computation can grow large if the schema or query are sufficiently complex, and that will increase the time spent planning.

This config allows specifying a per-path limit to the number of options considered. If any path's options exceeds this limit, query planning will abort and the operation will fail.

The default value is None, which specifies no limit.

Default: null
format=uint32min=0
experimental_reuse_query_plans boolean

If cache warm up is configured, this will allow the router to keep a query plan created with the old schema, if it determines that the schema update does not affect the corresponding query

Default: false
experimental_cooperative_cancellation

Configures cooperative cancellation of query planning

See [CooperativeCancellation] for more details.

Default:
{
  "enabled": true,
  "mode": "measure",
  "timeout": null
}
All of: CooperativeCancellation object
QueryPlanCache object

Cache configuration

in_memory

Configures the in memory cache (always active)

Default:
{
  "limit": 512
}
All of: InMemoryCache object
redis QueryPlanRedisCache | null

Configures and activates the Redis cache

Default: null
InMemoryCache object

In memory cache configuration

limit integer required

Number of entries in the Least Recently Used cache

format=uintmin=1
QueryPlanRedisCache object

Redis cache configuration

urls string[] required

List of URLs to the Redis cluster

username string | null

Redis username if not provided in the URLs. This field takes precedence over the username in the URL

password string | null

Redis password if not provided in the URLs. This field takes precedence over the password in the URL

timeout string | null

Redis request timeout (default: 500ms)

Default:
{
  "secs": 0,
  "nanos": 0
}
ttl string | null

TTL for entries

Default:
{
  "secs": 2592000,
  "nanos": 0
}
namespace string | null

namespace used to prefix Redis keys

tls TlsClient | null

TLS client configuration

Default: null
required_to_start boolean

Prevents the router from starting if it cannot connect to Redis

Default: false
reset_ttl boolean

When a TTL is set on a key, reset it when reading the data from that key

Default: true
pool_size integer

The size of the Redis connection pool

Default: 1
format=uint32min=0
TlsClient object

Configuration options pertaining to the subgraph server component.

certificate_authorities string | null

list of certificate authorities in PEM format

Default: null
client_authentication TlsClientAuth | null

client certificate authentication

Default: null
TlsClientAuth object

TLS client authentication

certificate_chain string required

list of certificates in PEM format

key string required

key in PEM format

CooperativeCancellation object
enabled boolean

When true, cooperative cancellation is enabled.

Default: true
mode

When enabled, this sets whether the router will cancel query planning or merely emit a metric when it would have happened.

Default: "measure"
All of: Mode string
timeout string | null

Enable timeout for query planning.

Default: null
Mode string
Cors object

Cross origin request configuration.

allow_any_origin boolean

Set to true to allow any origin. Defaults to false. This is the only way to allow Origin: null.

Default: false
allow_credentials boolean

Set to true to add the Access-Control-Allow-Credentials header.

Default: false
allow_headers string[]

The headers to allow.

If this value is not set, the router will mirror client's Access-Control-Request-Headers.

Note that if you set headers here, you also want to have a look at your CSRF plugins configuration, and make sure you either:

  • accept x-apollo-operation-name AND / OR apollo-require-preflight
  • defined csrf required headers in your yml configuration, as shown in the examples/cors-and-csrf/custom-headers.router.yaml files.
Default:
[]
expose_headers array | null

Which response headers should be made available to scripts running in the browser, in response to a cross-origin request.

Default: null
methods string[]

Allowed request methods. See module documentation for default behavior.

Default:
[
  "GET",
  "POST",
  "OPTIONS"
]
max_age string

The Access-Control-Max-Age header value in time units

Default: null
policies array | null

The origin(s) to allow requests from. The router matches request origins against policies in order, first by exact match, then by regex. See module documentation for default behavior.

Default:
[
  {
    "allow_credentials": null,
    "allow_headers": [],
    "expose_headers": [],
    "match_origins": [],
    "max_age": null,
    "methods": [
      "GET",
      "POST",
      "OPTIONS"
    ],
    "origins": [
      "https://studio.apollographql.com"
    ],
    "private_network_access": null
  }
]
Policy object

Configuration for a specific set of origins

allow_credentials boolean | null

Set to true to add the Access-Control-Allow-Credentials header for these origins

Default: null
allow_headers string[]

The headers to allow for these origins

Default:
[]
expose_headers string[]

Which response headers should be made available to scripts running in the browser

Default:
[]
match_origins string[]

Regex patterns to match origins against.

Default:
[]
max_age string

The Access-Control-Max-Age header value in time units

Default: null
methods array | null

Allowed request methods for these origins.

Default: null
origins string[]

The origins to allow requests from.

Default:
[
  "https://studio.apollographql.com"
]
private_network_access PrivateNetworkAccessPolicy | null

When Some, the Access-Control-Allow-Private-Network header will be added as well as the respective headers contained within the policy.

Default: null
PrivateNetworkAccessPolicy object
access_id string | null

When specified, the Private-Network-Access-ID header will be added with the given ID. The ID must be a 48-bit value presented as 6 hexadecimal bytes separated by colons, e.g. 01:23:45:67:89:0A.

Default: null
access_name string | null

When Some, the Private-Network-Access-Name header will be added with the given name. The name can be at most 248 UTF-8 code units and match a RegEx equivalent to the ECMAScript RegEx /^[a-z0-9_-.]+$/.

Default: null
Tls object

TLS related configuration options.

supergraph TlsSupergraph | null

TLS server configuration

This will affect the GraphQL endpoint and any other endpoint targeting the same listen address.

Default: null
subgraph

Outgoing TLS configuration to subgraphs.

Default:
{
  "all": {
    "certificate_authorities": null,
    "client_authentication": null
  },
  "subgraphs": {}
}
connector

Outgoing TLS configuration to Apollo Connectors.

Default:
{
  "sources": {},
  "all": {
    "certificate_authorities": null,
    "client_authentication": null
  }
}
All of: ConnectorConfiguration object
TlsSupergraph object

Configuration options pertaining to the supergraph server component.

certificate string required

server certificate in PEM format

key string required

server key in PEM format

certificate_chain string required

list of certificate authorities in PEM format

SubgraphTlsClientConfiguration object

Configuration options pertaining to the subgraph server component.

all

options applying to all subgraphs

Default:
{
  "certificate_authorities": null,
  "client_authentication": null
}
All of: TlsClient object
subgraphs Record<string, object>

per subgraph options

Default:
{}
ConnectorConfiguration object
sources Record<string, object>

Map of subgraph_name.connector_source_name to configuration

Default:
{}
all

Options applying to all sources

Default:
{
  "certificate_authorities": null,
  "client_authentication": null
}
All of: TlsClient object
Apq object

Automatic Persisted Queries (APQ) configuration

enabled boolean

Activates Automatic Persisted Queries (enabled by default)

Default: true
router
Default:
{
  "cache": {
    "in_memory": {
      "limit": 512
    },
    "redis": null
  }
}
All of: Router object
subgraph
Default:
{
  "all": {
    "enabled": false
  },
  "subgraphs": {}
}
Router object

Router level (APQ) configuration

cache
Default:
{
  "in_memory": {
    "limit": 512
  },
  "redis": null
}
All of: Cache object
Cache object

Cache configuration

in_memory

Configures the in memory cache (always active)

Default:
{
  "limit": 512
}
All of: InMemoryCache object
redis RedisCache | null

Configures and activates the Redis cache

Default: null
RedisCache object

Redis cache configuration

urls string[] required

List of URLs to the Redis cluster

username string | null

Redis username if not provided in the URLs. This field takes precedence over the username in the URL

password string | null

Redis password if not provided in the URLs. This field takes precedence over the password in the URL

timeout string | null

Redis request timeout (default: 500ms)

Default:
{
  "secs": 0,
  "nanos": 0
}
ttl string | null

TTL for entries

Default: null
namespace string | null

namespace used to prefix Redis keys

tls TlsClient | null

TLS client configuration

Default: null
required_to_start boolean

Prevents the router from starting if it cannot connect to Redis

Default: false
reset_ttl boolean

When a TTL is set on a key, reset it when reading the data from that key

Default: true
pool_size integer

The size of the Redis connection pool

Default: 1
format=uint32min=0
metrics_interval string | null

Interval for collecting Redis metrics (default: 1s)

Default:
{
  "secs": 0,
  "nanos": 0
}
SubgraphSubgraphApqConfiguration object

Configuration options pertaining to the subgraph server component.

all

options applying to all subgraphs

Default:
{
  "enabled": false
}
All of: SubgraphApq object
subgraphs Record<string, object>

per subgraph options

Default:
{}
SubgraphApq object

Subgraph level Automatic Persisted Queries (APQ) configuration

enabled boolean

Enable

Default: false
PersistedQueries object

Persisted Queries (PQ) configuration

enabled boolean

Activates Persisted Queries (disabled by default)

Default: false
log_unknown boolean

Enabling this field configures the router to log any freeform GraphQL request that is not in the persisted query list

Default: false
safelist

Restricts execution of operations that are not found in the Persisted Query List

Default:
{
  "enabled": false,
  "require_id": false
}
All of: PersistedQueriesSafelist object
experimental_prewarm_query_plan_cache

Experimental feature to prewarm the query plan cache with persisted queries

Default:
{
  "on_startup": false,
  "on_reload": true
}
local_manifests array | null

Enables using a local copy of the persisted query manifest to safelist operations

Default: null
hot_reload boolean

Enables hot reloading of the local persisted query manifests

Default: false
PersistedQueriesSafelist object

Persisted Queries (PQ) Safelisting configuration

enabled boolean

Enables using the persisted query list as a safelist (disabled by default)

Default: false
require_id boolean

Enabling this field configures the router to reject any request that does not include the persisted query ID

Default: false
PersistedQueriesPrewarmQueryPlanCache object

Persisted Queries (PQ) query plan cache prewarm configuration

on_startup boolean

Enabling this field uses the persisted query list to pre-warm the query planner cache on startup (disabled by default)

Default: false
on_reload boolean

Enabling this field uses the persisted query list to pre-warm the query planner cache on schema and config changes (enabled by default)

Default: true
LimitsConfig object

Configuration for operation limits, parser limits, HTTP limits, etc.

max_depth integer | null

If set, requests with operations deeper than this maximum are rejected with a HTTP 400 Bad Request response and GraphQL error with "extensions": {"code": "MAX_DEPTH_LIMIT"}

Counts depth of an operation, looking at its selection sets,˛ including fields in fragments and inline fragments. The following example has a depth of 3.

query getProduct {
  book { # 1
    ...bookDetails
  }
}

fragment bookDetails on Book {
  details { # 2
    ... on ProductDetailsBook {
      country # 3
    }
  }
}
Default: null
format=uint32min=0
max_height integer | null

If set, requests with operations higher than this maximum are rejected with a HTTP 400 Bad Request response and GraphQL error with "extensions": {"code": "MAX_DEPTH_LIMIT"}

Height is based on simple merging of fields using the same name or alias, but only within the same selection set. For example name here is only counted once and the query has height 3, not 4:

query {
    name { first }
    name { last }
}

This may change in a future version of Apollo Router to do full field merging across fragments instead.

Default: null
format=uint32min=0
max_root_fields integer | null

If set, requests with operations with more root fields than this maximum are rejected with a HTTP 400 Bad Request response and GraphQL error with "extensions": {"code": "MAX_ROOT_FIELDS_LIMIT"}

This limit counts only the top level fields in a selection set, including fragments and inline fragments.

Default: null
format=uint32min=0
max_aliases integer | null

If set, requests with operations with more aliases than this maximum are rejected with a HTTP 400 Bad Request response and GraphQL error with "extensions": {"code": "MAX_ALIASES_LIMIT"}

Default: null
format=uint32min=0
warn_only boolean

If set to true (which is the default is dev mode), requests that exceed a max_* limit are not rejected. Instead they are executed normally, and a warning is logged.

Default: false
parser_max_recursion integer

Limit recursion in the GraphQL parser to protect against stack overflow. default: 500

Default: 500
format=uintmin=0
parser_max_tokens integer

Limit the number of tokens the GraphQL parser processes before aborting.

Default: 15000
format=uintmin=0
http_max_request_bytes integer

Limit the size of incoming HTTP requests read from the network, to protect against running out of memory. Default: 2000000 (2 MB)

Default: 2000000
format=uintmin=0
http1_max_request_headers integer | null

Limit the maximum number of headers of incoming HTTP1 requests. Default is 100.

If router receives more headers than the buffer size, it responds to the client with "431 Request Header Fields Too Large".

Default: null
format=uintmin=0
http1_max_request_buf_size string | null

Limit the maximum buffer size for the HTTP1 connection.

Default is ~400kib.

Default: null
http2_max_headers_list_bytes string | null

For HTTP2, limit the header list to a threshold of bytes. Default is 16kb.

If router receives more headers than allowed size of the header list, it responds to the client with "431 Request Header Fields Too Large".

Default: null
introspection_max_depth boolean

Limit the depth of nested list fields in introspection queries to protect avoid generating huge responses. Returns a GraphQL error with { message: "Maximum introspection depth exceeded" } when nested fields exceed the limit. Default: true

Default: true
Config object

Configuration for chaos testing, trying to reproduce bugs that require uncommon conditions. You probably don't want this in production!

How Chaos Reloading Works

The chaos system automatically captures and replays the last known schema and configuration events to force hot reloads even when the underlying content hasn't actually changed. This is particularly useful for memory leak detection during hot reload scenarios. If configured, it will activate upon the first config event that is encountered.

Schema Reloading (force_schema_reload)

When enabled, the router will periodically replay the last schema event with a timestamp comment injected into the SDL (e.g., # Chaos reload timestamp: 1234567890). This ensures the schema is seen as "different" and triggers a full hot reload, even though the functional schema content is identical.

Configuration Reloading (force_config_reload)

When enabled, the router will periodically replay the last configuration event. The configuration is cloned and re-emitted, which triggers the router's configuration change detection and reload logic.

Example Usage

experimental_chaos:
  force_schema_reload: "30s"    # Trigger schema reload every 30 seconds
  force_config_reload: "2m"     # Trigger config reload every 2 minutes
force_schema_reload string | null

Force a hot reload of the schema at regular intervals by injecting a timestamp comment into the SDL. This ensures schema reloads occur even when the functional schema content hasn't changed, which is useful for testing memory leaks during schema hot reloads.

The system automatically captures the last schema event and replays it with a timestamp comment added to make it appear "different" to the reload detection logic.

Default: null
force_config_reload string | null

Force a hot reload of the configuration at regular intervals by replaying the last configuration event. This triggers the router's configuration change detection even when the configuration content hasn't actually changed.

The system automatically captures the last configuration event and replays it to force configuration reload processing.

Default: null
Plugins object
experimental.broken object

This is a broken plugin for testing purposes only.

1 nested properties
enabled boolean required

Enable the broken plugin.

experimental.expose_query_plan boolean

Expose query plan

experimental.record object

Request recording configuration.

2 nested properties
enabled boolean required

The recording plugin is disabled by default.

storage_path string | null

The path to the directory where recordings will be stored. Defaults to the current working directory.

experimental.restricted object

Restricted plugin (for testing purposes only)

1 nested properties
enabled boolean required

Enable the restricted plugin (for testing purposes only)

Config2 object

This is a broken plugin for testing purposes only.

enabled boolean required

Enable the broken plugin.

ExposeQueryPlanConfig boolean

Expose query plan

RecordConfig object

Request recording configuration.

enabled boolean required

The recording plugin is disabled by default.

storage_path string | null

The path to the directory where recordings will be stored. Defaults to the current working directory.

Config3 object

Restricted plugin (for testing purposes only)

enabled boolean required

Enable the restricted plugin (for testing purposes only)

AuthenticationConfig object

Authentication

Router configuration

Subgraph configuration

Connector configuration

AuthenticationRouterConfig object
jwt required

The JWT configuration

All of: JWTConf object
JWTConf object
jwks JwksConf[] required

List of JWKS used to verify tokens

header_name string

HTTP header expected to contain JWT

Default: "authorization"
header_value_prefix string

Header value prefix

Default: "Bearer"
ignore_other_prefixes boolean

Whether to ignore any mismatched prefixes

Default: false
sources Source[]

Alternative sources to extract the JWT

on_error

Control the behavior when an error occurs during the authentication process.

Defaults to Error. When set to Continue, requests that fail JWT authentication will continue to be processed by the router, but without the JWT claims in the context. When set to Error, requests that fail JWT authentication will be rejected with a HTTP 403 error.

All of: OnError string
JwksConf object
url string required

Retrieve the JWK Set

poll_interval string

Polling interval for each JWKS endpoint in human-readable format; defaults to 60s

Default:
{
  "secs": 60,
  "nanos": 0
}
issuers array | null

Expected issuers for tokens verified by that JWKS

If not specified, the issuer will not be checked.

uniqueItems=true
audiences array | null

Expected audiences for tokens verified by that JWKS

If not specified, the audience will not be checked.

uniqueItems=true
algorithms array | null

List of accepted algorithms. Possible values are HS256, HS384, HS512, ES256, ES384, RS256, RS384, RS512, PS256, PS384, PS512, EdDSA

Default: null
headers Header[]

List of headers to add to the JWKS request

Header object

Insert a header

name string required

The name of the header

value string required

The value for the header

Source object | object
OnError string
AuthenticationSubgraphConfig object

Configure subgraph authentication

all AuthConfig | null

Configuration that will apply to all subgraphs.

Default: null
subgraphs Record<string, object>

Create a configuration that will apply only to a specific subgraph.

Default:
{}
AuthConfig object
AWSSigV4Config object | object

Configure AWS sigv4 auth.

AWSSigV4HardcodedConfig object

Hardcoded Config using access_key and secret. Prefer using DefaultChain instead.

access_key_id string required

The ID for this access key.

secret_access_key string required

The secret key used to sign requests.

region string required

The AWS region this chain applies to.

service_name string required

The service you're trying to access, eg: "s3", "vpc-lattice-svcs", etc.

assume_role AssumeRoleProvider | null

Specify assumed role configuration.

AssumeRoleProvider object

Specify assumed role configuration.

role_arn string required

Amazon Resource Name (ARN) for the role assumed when making requests

session_name string required

Uniquely identify a session when the same role is assumed by different principals or for different reasons.

external_id string | null

Unique identifier that might be required when you assume a role in another account.

DefaultChainConfig object

Configuration of the DefaultChainProvider

region string required

The AWS region this chain applies to.

service_name string required

The service you're trying to access, eg: "s3", "vpc-lattice-svcs", etc.

profile_name string | null

The profile name used by this provider

assume_role AssumeRoleProvider | null

Specify assumed role configuration.

AuthenticationConnectorConfig object

Configure connector authentication

sources Record<string, object>

Create a configuration that will apply only to a specific source.

Default:
{}
AuthorizationConfig object

Authorization plugin

require_authentication boolean

Reject unauthenticated requests

Default: false
directives

@authenticated, @requiresScopes and @policy directives

AuthorizationDirectivesConfig object
enabled boolean

enables the @authenticated and @requiresScopes directives

Default: true
dry_run boolean

generates the authorization error messages without modying the query

Default: false
reject_unauthorized boolean

refuse a query entirely if any part would be filtered

Default: false
errors

authorization errors behaviour

Default:
{
  "log": true,
  "response": "errors"
}
All of: AuthorizationErrorConfig object
AuthorizationErrorConfig object
log boolean

log authorization errors

Default: true
response

location of authorization errors in the GraphQL response

Default: "errors"
All of: ErrorLocation string | string | string
ErrorLocation string | string | string
ConnectorsConfig object
subgraphs Record<string, object>

A map of subgraph name to connectors config for that subgraph

Default:
{}
sources Record<string, object>

Map of subgraph_name.connector_source_name to source configuration

Default:
{}
debug_extensions boolean

Enables connector debugging information on response extensions if the feature is enabled

Default: false
max_requests_per_operation_per_source integer | null

The maximum number of requests for a connector source

Default: null
format=uintmin=0
expose_sources_in_context boolean

When enabled, adds an entry to the context for use in coprocessors

{
  "context": {
    "entries": {
      "apollo_connectors::sources_in_query_plan": [
        { "subgraph_name": "subgraph", "source_name": "source" }
      ]
    }
  }
}
Default: false
preview_connect_v0_2 boolean | null

Enables Connect spec v0.2 during the preview.

Default: null
preview_connect_v0_3 boolean | null

Feature gate for Connect spec v0.3. Set to true to enable the using the v0.3 spec during the preview phase.

Default: null
preview_connect_v0_4 boolean | null

Feature gate for Connect spec v0.3. Set to true to enable the using the v0.3 spec during the preview phase.

Default: null
SubgraphConnectorConfiguration object

Configuration for a connector subgraph

$config object

Other values that can be used by connectors via {$config.<key>}

Default:
{}
sources Record<string, object>

A map of @source(name:) to configuration for that source

Default:
{}
SourceConfiguration object

Configuration for a @source directive

$config object

Other values that can be used by connectors via {$config.<key>}

Default:
{}
override_url string | null

Override the @source(http: {baseURL:})

Default: null
format=uri
max_requests_per_operation integer | null

The maximum number of requests for this source

Default: null
format=uintmin=0
CoprocessorConfig object

Configures the externalization plugin

url string required

The url you'd like to offload processing to (can be overridden per-stage)

client Client | null
timeout string

The timeout for external requests

Default:
{
  "secs": 1,
  "nanos": 0
}
response_validation boolean

Response validation defaults to true

Default: true
router

The router stage request/response configuration

All of: RouterStage object
supergraph

The supergraph stage request/response configuration

All of: SupergraphStage object
execution

The execution stage request/response configuration

All of: ExecutionStage object
subgraph

The subgraph stage request/response configuration

All of: SubgraphStages object
Client object

HTTP client configuration for coprocessors.

experimental_http2 Http2Config | null

Use HTTP/2 to communicate with the coprocessor.

dns_resolution_strategy DnsResolutionStrategy | null

Specify a DNS resolution strategy to use when resolving the coprocessor URL.

Http2Config string | string | string
DnsResolutionStrategy string | string | string | string | string
RouterStage object
request

The request configuration

All of: RouterRequestConf object
response

The response configuration

All of: RouterResponseConf object
RouterRequestConf object

What information is passed to a router request/response stage

condition ConditionRouterSelector | null

Condition to trigger this stage

headers boolean

Send the headers

Default: false
context

Send the context

All of: ContextConf boolean | NewContextConf
body boolean

Send the body

Default: false
sdl boolean

Send the SDL

Default: false
path boolean

Send the path

Default: false
method boolean

Send the method

Default: false
url string | null

The coprocessor URL for this stage (overrides the global URL if specified)

Default: null
ConditionRouterSelector object | object | object | object | object | object | object | string | string

Specify a condition for when an instrument should be mutated or an event should be triggered.

RouterSelectorOrValue
AttributeValue boolean | integer | number | string
AttributeArray boolean[] | integer[] | number[] | string[]
RouterSelector object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | string | object | object | object
ErrorRepr string
OperationName string | string
ResponseStatus string | string
ActiveSubgraphRequests string | string
TraceIdFormat string | string | string | string | string
ContextConf boolean | NewContextConf

Configures the context

NewContextConf string | string | object

Configures the context

RouterResponseConf object

What information is passed to a router request/response stage

condition

Condition to trigger this stage

All of: ConditionRouterSelector object | object | object | object | object | object | object | string | string
headers boolean

Send the headers

Default: false
context

Send the context

All of: ContextConf boolean | NewContextConf
body boolean

Send the body

Default: false
sdl boolean

Send the SDL

Default: false
status_code boolean

Send the HTTP status

Default: false
url string | null

The coprocessor URL for this stage (overrides the global URL if specified)

Default: null
SupergraphStage object
request

The request configuration

All of: SupergraphRequestConf object
response object

What information is passed to a router request/response stage

7 nested properties
condition

Condition to trigger this stage

All of: ConditionSupergraphSelector object | object | object | object | object | object | object | string | string
headers boolean

Send the headers

Default: false
context

Send the context

All of: ContextConf boolean | NewContextConf
body boolean

Send the body

Default: false
sdl boolean

Send the SDL

Default: false
status_code boolean

Send the HTTP status

Default: false
url string | null

The coprocessor URL for this stage (overrides the global URL if specified)

Default: null
SupergraphRequestConf object

What information is passed to a router request/response stage

condition

Condition to trigger this stage

All of: ConditionSupergraphSelector object | object | object | object | object | object | object | string | string
headers boolean

Send the headers

Default: false
context

Send the context

All of: ContextConf boolean | NewContextConf
body boolean

Send the body

Default: false
sdl boolean

Send the SDL

Default: false
method boolean

Send the method

Default: false
url string | null

The coprocessor URL for this stage (overrides the global URL if specified)

Default: null
ConditionSupergraphSelector object | object | object | object | object | object | object | string | string

Specify a condition for when an instrument should be mutated or an event should be triggered.

SupergraphSelectorOrValue
SupergraphSelector object | object | object | object | object | object | object | object | object | object | object | object | object | string | object | object | object | object | object
OperationKind string
Query string | string | string | string | string
CostValue string | string | string | string
SupergraphResponseConf object

What information is passed to a router request/response stage

condition

Condition to trigger this stage

All of: ConditionSupergraphSelector object | object | object | object | object | object | object | string | string
headers boolean

Send the headers

Default: false
context

Send the context

All of: ContextConf boolean | NewContextConf
body boolean

Send the body

Default: false
sdl boolean

Send the SDL

Default: false
status_code boolean

Send the HTTP status

Default: false
url string | null

The coprocessor URL for this stage (overrides the global URL if specified)

Default: null
ExecutionStage object
request

The request configuration

All of: ExecutionRequestConf object
response object

What information is passed to a router request/response stage

6 nested properties
headers boolean

Send the headers

Default: false
context

Send the context

All of: ContextConf boolean | NewContextConf
body boolean

Send the body

Default: false
sdl boolean

Send the SDL

Default: false
status_code boolean

Send the HTTP status

Default: false
url string | null

The coprocessor URL for this stage (overrides the global URL if specified)

Default: null
ExecutionRequestConf object

What information is passed to a router request/response stage

headers boolean

Send the headers

Default: false
context

Send the context

All of: ContextConf boolean | NewContextConf
body boolean

Send the body

Default: false
sdl boolean

Send the SDL

Default: false
method boolean

Send the method

Default: false
query_plan boolean

Send the query plan

Default: false
url string | null

The coprocessor URL for this stage (overrides the global URL if specified)

Default: null
ExecutionResponseConf object

What information is passed to a router request/response stage

headers boolean

Send the headers

Default: false
context

Send the context

All of: ContextConf boolean | NewContextConf
body boolean

Send the body

Default: false
sdl boolean

Send the SDL

Default: false
status_code boolean

Send the HTTP status

Default: false
url string | null

The coprocessor URL for this stage (overrides the global URL if specified)

Default: null
SubgraphStages object

What information is passed to a subgraph request/response stage

all object

What information is passed to a subgraph request/response stage

2 nested properties
request object

What information is passed to a subgraph request/response stage

9 nested properties
condition

Condition to trigger this stage

All of: ConditionSubgraphSelector object | object | object | object | object | object | object | string | string
headers boolean

Send the headers

Default: false
context

Send the context

All of: ContextConf boolean | NewContextConf
body boolean

Send the body

Default: false
uri boolean

Send the subgraph URI

Default: false
method boolean

Send the method URI

Default: false
service_name boolean

Send the service name

Default: false
subgraph_request_id boolean

Send the subgraph request id

Default: false
url string | null

The coprocessor URL for this stage (overrides the global URL if specified)

Default: null
response object

What information is passed to a subgraph request/response stage

8 nested properties
condition

Condition to trigger this stage

All of: ConditionSubgraphSelector object | object | object | object | object | object | object | string | string
headers boolean

Send the headers

Default: false
context

Send the context

All of: ContextConf boolean | NewContextConf
body boolean

Send the body

Default: false
service_name boolean

Send the service name

Default: false
status_code boolean

Send the http status

Default: false
subgraph_request_id boolean

Send the subgraph request id

Default: false
url string | null

The coprocessor URL for this stage (overrides the global URL if specified)

Default: null
SubgraphStage object

What information is passed to a subgraph request/response stage

request object

What information is passed to a subgraph request/response stage

9 nested properties
condition

Condition to trigger this stage

All of: ConditionSubgraphSelector object | object | object | object | object | object | object | string | string
headers boolean

Send the headers

Default: false
context

Send the context

All of: ContextConf boolean | NewContextConf
body boolean

Send the body

Default: false
uri boolean

Send the subgraph URI

Default: false
method boolean

Send the method URI

Default: false
service_name boolean

Send the service name

Default: false
subgraph_request_id boolean

Send the subgraph request id

Default: false
url string | null

The coprocessor URL for this stage (overrides the global URL if specified)

Default: null
response object

What information is passed to a subgraph request/response stage

8 nested properties
condition

Condition to trigger this stage

All of: ConditionSubgraphSelector object | object | object | object | object | object | object | string | string
headers boolean

Send the headers

Default: false
context

Send the context

All of: ContextConf boolean | NewContextConf
body boolean

Send the body

Default: false
service_name boolean

Send the service name

Default: false
status_code boolean

Send the http status

Default: false
subgraph_request_id boolean

Send the subgraph request id

Default: false
url string | null

The coprocessor URL for this stage (overrides the global URL if specified)

Default: null
SubgraphRequestConf object

What information is passed to a subgraph request/response stage

condition

Condition to trigger this stage

All of: ConditionSubgraphSelector object | object | object | object | object | object | object | string | string
headers boolean

Send the headers

Default: false
context

Send the context

All of: ContextConf boolean | NewContextConf
body boolean

Send the body

Default: false
uri boolean

Send the subgraph URI

Default: false
method boolean

Send the method URI

Default: false
service_name boolean

Send the service name

Default: false
subgraph_request_id boolean

Send the subgraph request id

Default: false
url string | null

The coprocessor URL for this stage (overrides the global URL if specified)

Default: null
ConditionSubgraphSelector object | object | object | object | object | object | object | string | string

Specify a condition for when an instrument should be mutated or an event should be triggered.

SubgraphSelectorOrValue
SubgraphSelector object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | object | string | object | object | object | object | object | object
SubgraphQuery string
CacheKind string
EntityType All | string
All string
CacheStatus string
CacheControlSelector string | string | string
SubgraphResponseConf object

What information is passed to a subgraph request/response stage

condition

Condition to trigger this stage

All of: ConditionSubgraphSelector object | object | object | object | object | object | object | string | string
headers boolean

Send the headers

Default: false
context

Send the context

All of: ContextConf boolean | NewContextConf
body boolean

Send the body

Default: false
service_name boolean

Send the service name

Default: false
status_code boolean

Send the http status

Default: false
subgraph_request_id boolean

Send the subgraph request id

Default: false
url string | null

The coprocessor URL for this stage (overrides the global URL if specified)

Default: null
CSRFConfig object

CSRF protection configuration.

See https://owasp.org/www-community/attacks/csrf for an explanation on CSRF attacks.

unsafe_disabled boolean

The CSRF plugin is enabled by default.

Setting unsafe_disabled: true disables CSRF protection.

Default: false
required_headers string[]

Override the headers to check for by setting custom_headers Note that if you set required_headers here, you may also want to have a look at your CORS configuration, and make sure you either:

  • did not set any allow_headers list (so it defaults to mirror_request)
  • added your required headers to the allow_headers list, as shown in the examples/cors-and-csrf/custom-headers.router.yaml files.
Default:
[
  "x-apollo-operation-name",
  "apollo-require-preflight"
]
DemandControlConfig object

Demand control configuration

enabled boolean required

Enable demand control

mode required

The mode that the demand control plugin should operate in.

  • Measure: The plugin will measure the cost of incoming requests but not reject them.
  • Enforce: The plugin will enforce the cost of incoming requests and reject them if the algorithm indicates that they should be rejected.
All of: Mode2 string
strategy required

The strategy used to reject requests.

All of: StrategyConfig object
Mode2 string
StrategyConfig object

Algorithm for calculating the cost of an incoming query.

Config4 object

The enhanced client-awareness plugin has no configuration.

Config5 object

Configuration for the diagnostics plugin

Platform Requirements: This plugin is supported on all platforms. Heap dump functionality is only available on Linux platforms due to jemalloc requirements. Other diagnostic features work across platforms.

enabled boolean

Enable the diagnostics plugin

Default: false
listen

The socket address and port to listen on Defaults to 127.0.0.1:8089 Do not expose this endpoint to the internet as it exposes sensitive information.

Default: "127.0.0.1:8089"
All of: ListenAddr string | string
output_directory string

Directory path for memory dump files Defaults to "/tmp/router-diagnostics" on Unix, or temp directory on other platforms

This directory will be created automatically if it doesn't exist. Note: Memory dumps are only generated on Linux platforms.

Default: "/tmp/router-diagnostics"
SubgraphConfig object

Configuration for one subgraph for the mock_subgraphs plugin

headers Record<string, string>

HTTP headers for the subgraph response

query object

Data for query operations (excluding the special _entities field)

In maps nested in this one (but not at the top level), the __cacheTags key is special. Instead of representing a field that can be selected, when its parent field is selected its value is expected to be an array which is appended to the response.extensions["apolloCacheTags"] array.

Default:
{}
mutation object | null

Data for mutation operations

Default: null
entities object[]

Entities that can be queried through Federation’s special _entities field

In maps directly in the top-level Vec (but not in other maps nested deeper), the __cacheTags key is special. Instead of representing a field that can be selected, when its parent entity is selected its contents are added to the response.extensions["apolloEntityCacheTags"] array.

Default:
[]
Conf object

The fleet detector plugin has no configuration.

ForbidMutationsConfig boolean

Forbid mutations configuration

HeadersConfig object

Configuration for header propagation

all HeadersLocation | null

Rules to apply to all subgraphs

subgraphs Record<string, object>

Rules to specific subgraphs

connector

Rules for connectors

HeadersLocation object
request Operation[] required

Propagate/Insert/Remove headers from request

Operation object | object | object
Insert

Insert header

InsertStatic object

Insert static header

name string required

The name of the header

value string required

The value for the header

InsertFromContext object

Insert header with a value coming from context key

name string required

Specify header name

from_context string required

Specify context key to fetch value

InsertFromBody object

Insert header with a value coming from body

name string required

The target header name

path string required

The path in the request body

default string | null

The default if the path in the body did not resolve to an element

Remove object | object

Remove header

Propagate object | object

Propagate header

ConnectorHeadersConfiguration object
sources Record<string, object>

Map of subgraph_name.connector_source_name to configuration

all HeadersLocation | null

Options applying to all sources across all subgraphs

IncludeSubgraphErrorsConfig object

Configuration for exposing errors that originate from subgraphs

all

Global configuration for error redaction. Applies to all subgraphs.

Default: false
All of: ErrorMode boolean | object | object
subgraphs Record<string, boolean | object | object | object>

Overrides global configuration on a per-subgraph basis

Default:
{}
ErrorMode boolean | object | object
SubgraphConfig2 boolean | object | object | object
LicenseEnforcementConfig object

The license enforcement plugin has no configuration.

Conf2 object

Subgraph URL mappings

Config6 object

Configuration for entity caching

subgraph required

Configure invalidation per subgraph

enabled boolean

Enable or disable the entity caching feature

Default: false
expose_keys_in_context boolean

Expose cache keys in context

Default: false
invalidation InvalidationEndpointConfig | null

Global invalidation configuration

metrics

Entity caching evaluation metrics

All of: Metrics object
SubgraphSubgraphConfiguration object

Configuration options pertaining to the subgraph server component.

all

options applying to all subgraphs

Default:
{
  "redis": null,
  "ttl": null,
  "enabled": true,
  "private_id": null,
  "invalidation": null
}
All of: Subgraph object
subgraphs Record<string, object>

per subgraph options

Default:
{}
Subgraph object

Per subgraph configuration for entity caching

redis RedisCache | null

Redis configuration

Default: null
ttl Ttl | null

expiration for all keys for this subgraph, unless overridden by the Cache-Control header in subgraph responses

Default: null
enabled boolean | null

activates caching for this subgraph, overrides the global configuration

Default: true
private_id string | null

Context key used to separate cache sections per user

Default: null
invalidation SubgraphInvalidationConfig | null

Invalidation configuration

Default: null
Ttl string

Per subgraph configuration for entity caching

SubgraphInvalidationConfig object
enabled boolean

Enable the invalidation

Default: false
shared_key string

Shared key needed to request the invalidation endpoint

Default: ""
InvalidationEndpointConfig object
path string required

Specify on which path you want to listen for invalidation endpoint.

listen required

Listen address on which the invalidation endpoint must listen.

All of: ListenAddr string | string
scan_count integer

Number of keys to return at once from a redis SCAN command

Default: 1000
format=uint32min=0
concurrent_requests integer

Number of concurrent invalidation requests

Default: 10
format=uint32min=0
Metrics object

Per subgraph configuration for entity caching

enabled boolean

enables metrics evaluating the benefits of entity caching

Default: false
ttl Ttl | null

Metrics counter TTL

separate_per_type boolean

Adds the entity type name to attributes. This can greatly increase the cardinality

Default: false
FileUploadsConfig object

Configuration for File Uploads plugin

enabled boolean required

Whether the file upload plugin should be enabled (default: false)

protocols required

Supported protocol configurations for file uploads

All of: FileUploadProtocols object
FileUploadProtocols object

Configuration for the various protocols supported by the file upload plugin

multipart required

Configuration for multipart requests.

This protocol conforms to jaydenseric's multipart spec

All of: MultipartRequest object
MultipartRequest object

Configuration for a multipart request for file uploads.

This protocol conforms to jaydenseric's multipart spec

enabled boolean

Whether to enable the multipart protocol for file uploads (default: true)

Default: true
mode

The supported mode for the request (default: [MultipartRequestMode::Stream])

All of: MultipartRequestMode string
limits

Resource limits for multipart requests

All of: MultipartRequestLimits object
MultipartRequestMode string

Supported mode for a multipart request

MultipartRequestLimits object

Request limits for a multipart request

max_files integer required

The maximum amount of files allowed for a single query (default: 4)

format=uintmin=0
max_file_size string required

The maximum size of each file, in bytes (default: 5MB)

Config7 object

Configuration for response caching

subgraph required

Configure invalidation per subgraph

enabled boolean

Enable or disable the response caching feature

Default: false
debug boolean

Enable debug mode for the debugger

Default: false
invalidation InvalidationEndpointConfig2 | null

Global invalidation configuration

private_queries_buffer_size integer

Buffer size for known private queries (default: 2048)

Default: 2048
format=uintmin=1
SubgraphSubgraphConfiguration2 object

Configuration options pertaining to the subgraph server component.

all

options applying to all subgraphs

Default:
{
  "redis": null,
  "ttl": null,
  "enabled": true,
  "private_id": null,
  "invalidation": null
}
All of: Subgraph2 object
subgraphs Record<string, object>

per subgraph options

Default:
{}
Subgraph2 object

Per subgraph configuration for response caching

redis Config8 | null

Redis configuration

Default: null
ttl Ttl2 | null

expiration for all keys for this subgraph, unless overridden by the Cache-Control header in subgraph responses

Default: null
enabled boolean | null

activates caching for this subgraph, overrides the global configuration

Default: true
private_id string | null

Context key used to separate cache sections per user

Default: null
invalidation SubgraphInvalidationConfig2 | null

Invalidation configuration

Default: null
Config8 object

Redis cache configuration

urls string[] required

List of URLs to the Redis cluster

username string | null

Redis username if not provided in the URLs. This field takes precedence over the username in the URL

password string | null

Redis password if not provided in the URLs. This field takes precedence over the password in the URL

fetch_timeout string | null

Timeout for Redis fetch commands (default: 150ms)

Default:
{
  "secs": 0,
  "nanos": 0
}
insert_timeout string | null

Timeout for Redis insert commands (default: 500ms)

Inserts are processed asynchronously, so this will not affect response duration.

Default:
{
  "secs": 0,
  "nanos": 0
}
invalidate_timeout string | null

Timeout for Redis invalidation commands (default: 1s)

Default:
{
  "secs": 0,
  "nanos": 0
}
maintenance_timeout string | null

Timeout for Redis maintenance commands (default: 500ms)

Maintenance tasks are processed asynchronously, so this will not affect response duration.

Default:
{
  "secs": 0,
  "nanos": 0
}
namespace string | null

namespace used to prefix Redis keys

tls TlsClient | null

TLS client configuration

Default: null
required_to_start boolean

Prevents the router from starting if it cannot connect to Redis

Default: false
pool_size integer

The size of the Redis connection pool (default: 5)

Default: 5
format=uint32min=0
metrics_interval string | null

Interval for collecting Redis metrics (default: 1s)

Default:
{
  "secs": 0,
  "nanos": 0
}
Ttl2 string

Per subgraph configuration for response caching

SubgraphInvalidationConfig2 object
enabled boolean

Enable the invalidation

Default: false
shared_key string

Shared key needed to request the invalidation endpoint

Default: ""
InvalidationEndpointConfig2 object
path string required

Specify on which path you want to listen for invalidation endpoint.

listen required

Listen address on which the invalidation endpoint must listen.

All of: ListenAddr string | string
Config9 object

Configuration for the progressive override plugin

RhaiConfig object

Configuration for the Rhai Plugin

scripts string | null

The directory where Rhai scripts can be found

main string | null

The main entry point for Rhai script evaluation

SubscriptionConfig object

Subscriptions configuration

enabled boolean

Enable subscription

Default: true
mode

Select a subscription mode (callback or passthrough)

Default:
{
  "callback": null,
  "passthrough": null
}
All of: SubscriptionModeConfig object
deduplication

Configure subgraph subscription deduplication

Default:
{
  "enabled": true,
  "ignored_headers": []
}
All of: DeduplicationConfig object
max_opened_subscriptions integer | null

This is a limit to only have maximum X opened subscriptions at the same time. By default if it's not set there is no limit.

Default: null
format=uintmin=0
queue_capacity integer | null

It represent the capacity of the in memory queue to know how many events we can keep in a buffer

Default: null
format=uintmin=0
SubscriptionModeConfig object
callback CallbackMode | null

Enable callback mode for subgraph(s)

passthrough SubgraphPassthroughMode | null

Enable passthrough mode for subgraph(s)

CallbackMode object

Using a callback url

public_url string required

URL used to access this router instance, including the path configured on the Router

heartbeat_interval

Heartbeat interval for callback mode (default: 5secs)

Default: "enabled"
All of: HeartbeatInterval string
listen ListenAddr | null

Listen address on which the callback must listen (default: 127.0.0.1:4000)

path string | null

Specify on which path you want to listen for callbacks (default: /callback)

subgraphs string[]

Specify on which subgraph we enable the callback mode for subscription If empty it applies to all subgraphs (passthrough mode takes precedence)

Default:
[]
uniqueItems=true
HeartbeatInterval string
Disabled string
Enabled string
SubgraphPassthroughMode object

Configuration for all subgraphs

Default: null
subgraphs Record<string, object>

Configuration for specific subgraphs

Default:
{}
WebSocketConfiguration object

WebSocket configuration for a specific subgraph

path string | null

Path on which WebSockets are listening

Default: null
protocol

Which WebSocket GraphQL protocol to use for this subgraph possible values are: 'graphql_ws' | 'graphql_transport_ws' (default: graphql_ws)

Default: "graphql_ws"
All of: WebSocketProtocol string | string
heartbeat_interval

Heartbeat interval for graphql-ws protocol (default: disabled)

Default: "disabled"
All of: HeartbeatInterval string
WebSocketProtocol string | string
DeduplicationConfig object

Subscription deduplication configuration

enabled boolean

Enable subgraph subscription deduplication. When enabled, multiple identical requests to the same subgraph will share one WebSocket connection in passthrough mode. (default: true)

Default: true
ignored_headers string[]

List of headers to ignore for deduplication. Even if these headers are different, the subscription request is considered identical. For example, if you forward the "User-Agent" header, but the subgraph doesn't depend on the value of that header, adding it to this list will let the router dedupe subgraph subscriptions even if the header value is different.

Default:
[]
uniqueItems=true
TelemetryConfig object

Telemetry configuration

apollo

Apollo reporting configuration

All of: ApolloTelemetryConfig object
exporters

Instrumentation configuration

All of: Exporters object
instrumentation

Instrumentation configuration

All of: Instrumentation object
ApolloTelemetryConfig object
endpoint string

The Apollo Studio endpoint for exporting traces and metrics.

Default: "https://usage-reporting.api.apollographql.com/api/ingress/traces"
experimental_otlp_endpoint string

The Apollo Studio endpoint for exporting traces and metrics.

Default: "https://usage-reporting.api.apollographql.com/"
client_name_header string | null

The name of the header to extract from requests when populating 'client name' for traces and metrics in Apollo Studio.

Default: "apollographql-client-name"
client_version_header string | null

The name of the header to extract from requests when populating 'client version' for traces and metrics in Apollo Studio.

Default: "apollographql-client-version"
buffer_size integer

The buffer size for sending traces to Apollo. Increase this if you are experiencing lost traces.

Default: 10000
format=uintmin=1
field_level_instrumentation_sampler

Field level instrumentation for subgraphs via ftv1. ftv1 tracing can cause performance issues as it is transmitted in band with subgraph responses.

All of: SamplerOption number | Sampler
otlp_tracing_sampler

Percentage of traces to send via the OTel protocol when sending to Apollo Studio.

All of: SamplerOption number | Sampler
experimental_otlp_tracing_protocol

OTLP protocol used for OTel traces. Note this only applies if OTel traces are enabled and is only intended for use in tests.

Default: "grpc"
All of: Protocol string
experimental_otlp_metrics_protocol

OTLP protocol used for OTel metrics. Note this is only intended for use in tests.

Default: "grpc"
All of: Protocol string
send_headers

To configure which request header names and values are included in trace data that's sent to Apollo Studio.

All of: ForwardHeaders string | string | object | object
send_variable_values

To configure which GraphQL variable values are included in trace data that's sent to Apollo Studio

All of: ForwardValues string | string | object | object
tracing

Configuration for tracing.

All of: TracingConfiguration object
metrics

Configuration for metrics.

All of: MetricsConfiguration object
errors

Configure the way errors are transmitted to Apollo Studio

All of: ErrorsConfiguration object
signature_normalization_algorithm

Set the signature normalization algorithm to use when sending Apollo usage reports.

Default: "enhanced"
All of: ApolloSignatureNormalizationAlgorithm string | string
metrics_reference_mode

Set the Apollo usage report reference reporting mode to use.

All of: ApolloMetricsReferenceMode string | string
experimental_local_field_metrics boolean

Enable field metrics that are generated without FTV1 to be sent to Apollo Studio.

Default: false
subgraph_metrics boolean

Enable sending additional subgraph metrics to Apollo Studio via OTLP

Default: false
SamplerOption number | Sampler
Sampler string | string
Protocol string
ForwardHeaders string | string | object | object

Forward headers

ForwardValues string | string | object | object

Forward GraphQL variables

TracingConfiguration object
batch_processor

Configuration for tracing batch processor.

All of: BatchProcessorConfig object
BatchProcessorConfig object

Batch processor configuration

scheduled_delay string

The delay interval in milliseconds between two consecutive processing of batches. The default value is 5 seconds.

Default:
{
  "secs": 5,
  "nanos": 0
}
max_queue_size integer

The maximum queue size to buffer spans for delayed processing. If the queue gets full it drops the spans. The default value is 2048.

Default: 2048
format=uintmin=0
max_export_batch_size integer

The maximum number of spans to process in a single batch. If there are more than one batch worth of spans then it processes multiple batches of spans one batch after the other without any delay. The default value is 512.

Default: 512
format=uintmin=0
max_export_timeout string

The maximum duration to export a batch of data. The default value is 30 seconds.

Default:
{
  "secs": 30,
  "nanos": 0
}
max_concurrent_exports integer

Maximum number of concurrent exports

Limits the number of spawned tasks for exports and thus memory consumed by an exporter. A value of 1 will cause exports to be performed synchronously on the BatchSpanProcessor task. The default is 1.

Default: 1
format=uintmin=0
MetricsConfiguration object
otlp

Configuration for exporting metrics via OTLP.

All of: OtlpMetricsConfiguration object
usage_reports

Configuration for exporting metrics via Apollo usage reports.

OtlpMetricsConfiguration object
batch_processor

Batch processor config for OTLP metrics.

OtlpMetricsBatchProcessorConfiguration object
scheduled_delay string

The delay interval in milliseconds between two consecutive processing of batches. The default value is 5 seconds.

Default:
{
  "secs": 5,
  "nanos": 0
}
max_export_timeout string

The maximum duration to export a batch of data. The default value is 30 seconds.

Default:
{
  "secs": 30,
  "nanos": 0
}
UsageReportsMetricsConfiguration object
batch_processor

Batch processor config for Apollo usage report metrics.

ApolloUsageReportsBatchProcessorConfiguration object
scheduled_delay string

The delay interval in milliseconds between two consecutive processing of batches. The default value is 5 seconds.

Default:
{
  "secs": 5,
  "nanos": 0
}
max_queue_size integer

The maximum queue size to buffer spans for delayed processing. If the queue gets full it drops the reports. The default value is 2048.

Default: 2048
format=uintmin=0
max_export_timeout string

The maximum duration to export a batch of data. The default value is 30 seconds.

Default:
{
  "secs": 30,
  "nanos": 0
}
ErrorsConfiguration object
subgraph

Handling of errors coming from subgraph

All of: SubgraphErrorConfig object
preview_extended_error_metrics

Send error metrics via OTLP with additional dimensions [extensions.service, extensions.code]

All of: ExtendedErrorMetricsMode string | string
SubgraphErrorConfig object
all

Handling of errors coming from all subgraphs

All of: ErrorConfiguration object
subgraphs Record<string, object>

Handling of errors coming from specified subgraphs

ErrorConfiguration object
send boolean

Send subgraph errors to Apollo Studio

Default: true
redact boolean

Redact subgraph errors to Apollo Studio

Default: true
redaction_policy

Allows additional dimension extensions.code to be sent with errors even when redact is set to true. Has no effect when redact is false.

All of: ErrorRedactionPolicy string | string
ErrorRedactionPolicy string | string

Allow some error fields to be send to Apollo Studio even when redact is true.

ExtendedErrorMetricsMode string | string

Extended Open Telemetry error metrics mode

ApolloSignatureNormalizationAlgorithm string | string

Apollo usage report signature normalization algorithm

ApolloMetricsReferenceMode string | string

Apollo usage report reference generation modes.

Exporters object

Exporter configuration

logging

Logging configuration

All of: Logging object
metrics

Metrics configuration

All of: Metrics2 object
tracing

Tracing configuration

All of: Tracing object
Logging object

Logging configuration.

common

Common configuration

All of: LoggingCommon object
stdout

Settings for logging to stdout.

All of: StdOut object
LoggingCommon object
service_name string | null

Set a service.name resource in your metrics

Default: null
service_namespace string | null

Set a service.namespace attribute in your metrics

Default: null
resource Record<string, boolean | integer | number | string>

The Open Telemetry resource

Default:
{}
StdOut object
enabled boolean

Set to true to log to stdout.

Default: true
format

The format to log to stdout.

All of: logging_format object | string | object | string
tty_format logging_format | null

The format to log to stdout when you're running on an interactive terminal. When configured it will automatically use this tty_format`` instead of the original format` when an interactive terminal is detected

rate_limit

Log rate limiting. The limit is set per type of log message

All of: RateLimit object
logging_format object | string | object | string
DisplayTraceIdFormat TraceIdFormat | boolean
RateLimit object
enabled boolean

Set to true to limit the rate of log messages

Default: false
capacity integer

Number of log lines allowed in interval per message

Default: 1
format=uint32min=0
interval string

Interval for rate limiting

Default:
{
  "secs": 1,
  "nanos": 0
}
Metrics2 object

Metrics configuration

common

Common metrics configuration across all exporters

All of: MetricsCommon object
otlp

Open Telemetry native exporter configuration

All of: OTLPConfig object
prometheus

Prometheus exporter configuration

All of: PrometheusMetricsConfig object
MetricsCommon object
service_name string | null

Set a service.name resource in your metrics

Default: null
service_namespace string | null

Set a service.namespace attribute in your metrics

Default: null
resource Record<string, boolean | integer | number | string>

The Open Telemetry resource

Default:
{}
buckets number[]

Custom buckets for all histograms

Default:
[
  0.001,
  0.005,
  0.015,
  0.05,
  0.1,
  0.2,
  0.3,
  0.4,
  0.5,
  1.0,
  5.0,
  10.0
]
views MetricView[]

Views applied on metrics

MetricView object
name string required

The instrument name you're targeting

rename string | null

Rename the metric to this name

This allows you to customize metric names for both OTLP and Prometheus exporters. Note: Prometheus will apply additional transformations (dots to underscores, unit suffixes). Apollo metrics are not affected by this rename - they will retain original names.

description string | null

New description to set to the instrument

unit string | null

New unit to set to the instrument

aggregation MetricAggregation | null

New aggregation settings to set

allowed_attribute_keys array | null

An allow-list of attribute keys that will be preserved for the instrument.

Any attribute recorded for the instrument with a key not in this set will be dropped. If the set is empty, all attributes will be dropped, if None all attributes will be kept.

uniqueItems=true
MetricAggregation object | string
OTLPConfig object
enabled boolean required

Enable otlp

endpoint string | null

The endpoint to send data to

Default: null
protocol

The protocol to use when sending data

Default: "grpc"
All of: Protocol string
grpc

gRPC configuration settings

Default:
{
  "domain_name": null,
  "ca": null,
  "cert": null,
  "key": null,
  "metadata": {}
}
All of: GrpcExporter object
http

HTTP configuration settings

Default:
{
  "headers": {}
}
All of: HttpExporter object
batch_processor

Batch processor settings

All of: BatchProcessorConfig object
temporality

Temporality for export (default: Cumulative). Note that when exporting to Datadog agent use Delta.

Default: "cumulative"
All of: Temporality string | string
GrpcExporter object
domain_name string | null

The optional domain name for tls config. Note that domain name is will be defaulted to match the endpoint is not explicitly set.

Default: null
ca string | null

The optional certificate authority (CA) certificate to be used in TLS configuration.

Default: null
cert string | null

The optional cert for tls config

Default: null
key string | null

The optional private key file for TLS configuration.

Default: null
metadata object

gRPC metadata

Default:
{}
HttpExporter object
headers Record<string, string>

Headers to send on report requests

Default:
{}
Temporality string | string
PrometheusMetricsConfig object

Prometheus configuration

enabled boolean

Set to true to enable

Default: false
resource_selector

resource_selector is used to select which resource to export with every metrics.

All of: ResourceSelectorConfig string | string
listen

The listen address

Default: "127.0.0.1:9090"
All of: ListenAddr string | string
path string

The path where prometheus will be exposed

Default: "/metrics"
ResourceSelectorConfig string | string
Tracing object

Tracing configuration

experimental_response_trace_id

A way to expose trace id in response headers

All of: ExposeTraceId object
propagation

Propagation configuration

All of: Propagation object
common

Common configuration

All of: TracingCommon object
otlp

OpenTelemetry native exporter configuration

All of: OTLPConfig object
zipkin

Zipkin exporter configuration

All of: ZipkinConfig object
datadog

Datadog exporter configuration

All of: DatadogConfig object
ExposeTraceId object
enabled boolean

Expose the trace_id in response headers

Default: false
header_name string | null

Choose the header name to expose trace_id (default: apollo-trace-id)

format

Format of the trace ID in response headers

All of: TraceIdFormat string | string | string | string | string
Propagation object

Configure propagation of traces. In general you won't have to do this as these are automatically configured along with any exporter you configure.

request

Select a custom request header to set your own trace_id (header value must be convertible from hexadecimal to set a correct trace_id)

All of: RequestPropagation object
baggage boolean
Default: false
trace_context boolean

Propagate trace context https://www.w3.org/TR/trace-context/

Default: false
jaeger boolean

Propagate Jaeger

Default: false
datadog boolean

Propagate Datadog

Default: false
zipkin boolean

Propagate Zipkin

Default: false
aws_xray boolean

Propagate AWS X-Ray

Default: false
RequestPropagation object
header_name string required

Choose the header name to expose trace_id (default: apollo-trace-id)

format

The trace ID format that will be used when propagating to subgraph services.

All of: TraceIdFormat string | string | string | string | string
TracingCommon object
service_name string | null

The trace service name

Default: null
service_namespace string | null

The trace service namespace

Default: null
sampler

The sampler, always_on, always_off or a decimal between 0.0 and 1.0

All of: SamplerOption number | Sampler
preview_datadog_agent_sampling boolean | null

Use datadog agent sampling. This means that all spans will be sent to the Datadog agent and the sampling.priority attribute will be used to control if the span will then be sent to Datadog

Default: null
parent_based_sampler boolean

Whether to use parent based sampling

Default: true
max_events_per_span integer

The maximum events per span before discarding

Default: 128
format=uint32min=0
max_attributes_per_span integer

The maximum attributes per span before discarding

Default: 128
format=uint32min=0
max_links_per_span integer

The maximum links per span before discarding

Default: 128
format=uint32min=0
max_attributes_per_event integer

The maximum attributes per event before discarding

Default: 128
format=uint32min=0
max_attributes_per_link integer

The maximum attributes per link before discarding

Default: 128
format=uint32min=0
resource Record<string, boolean | integer | number | string>

The Open Telemetry resource

Default:
{}
ZipkinConfig object
enabled boolean required

Enable zipkin

endpoint

The endpoint to send to

All of: UriEndpoint string
batch_processor

Batch processor configuration

All of: BatchProcessorConfig object
UriEndpoint string
DatadogConfig object
enabled boolean required

Enable datadog

endpoint

The endpoint to send to

All of: UriEndpoint string
batch_processor

batch processor configuration

All of: BatchProcessorConfig object
enable_span_mapping boolean

Enable datadog span mapping for span name and resource name.

Default: true
fixed_span_names boolean

Fixes the span names, this means that the APM view will show the original span names in the operation dropdown.

Default: true
resource_mapping Record<string, string>

Custom mapping to be used as the resource field in spans, defaults to: router -> http.route supergraph -> graphql.operation.name query_planning -> graphql.operation.name subgraph -> subgraph.name subgraph_request -> subgraph.name http_request -> http.route

Default:
{}
span_metrics Record<string, boolean>

Which spans will be eligible for span stats to be collected for viewing in the APM view. Defaults to true for request, router, query_parsing, supergraph, execution, query_planning, subgraph, subgraph_request, connect, connect_request and http_request.

Default:
{
  "http_request": true,
  "request": true,
  "supergraph": true,
  "subgraph": true,
  "execution": true,
  "subgraph_request": true,
  "connect": true,
  "router": true,
  "parse_query": true,
  "query_planning": true,
  "connect_request": true
}
Instrumentation object

Instrumentation configuration

events

Event configuration

All of: Events object
spans

Span configuration

All of: Spans object
instruments

Instrument configuration

All of: InstrumentsConfig object
Events object

Events are

router

Router service events

supergraph

Subgraph service events

subgraph

Supergraph service events

connector

Connector events

ExtendedRouterEventsConfigWithEvent Record<string, object>
request

Log the router request

All of: StandardEventConfigRouterSelector EventLevelConfig | object
response

Log the router response

All of: StandardEventConfigRouterSelector EventLevelConfig | object
error

Log the router error

All of: StandardEventConfigRouterSelector EventLevelConfig | object
Event object

An event that can be logged as part of a trace. The event has an implicit type attribute that matches the name of the event in the yaml and a message that can be used to provide additional information.

level required

The log level of the event.

All of: EventLevelConfig string
message string required

The event message.

on required

When to trigger the event.

All of: EventOn string | string | string | string
attributes

The event attributes.

condition

The event conditions.

All of: ConditionRouterSelector object | object | object | object | object | object | object | string | string
EventLevelConfig string

Log level configuration for events. Use "off" to not log the event, or a level name to log the event at that level and above.

EventOn string | string | string | string

When to trigger the event.

dd.trace_id StandardAttribute | null

The datadog trace ID. This can be output in logs and used to correlate traces in Datadog.

trace_id StandardAttribute | null

The OpenTelemetry trace ID. This can be output in logs.

baggage boolean | null

All key values from trace baggage.

Default: null
error.type StandardAttribute | null

Describes a class of error the operation ended with. Examples:

  • timeout
  • name_resolution_error
  • 500

Requirement level: Conditionally Required: If request has ended with an error.

http.request.body.size StandardAttribute | null

The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the Content-Length header. For requests using transport encoding, this should be the compressed size. Examples:

  • 3495

Requirement level: Recommended

http.request.method StandardAttribute | null

HTTP request method. Examples:

  • GET
  • POST
  • HEAD

Requirement level: Required

http.response.body.size StandardAttribute | null

The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the Content-Length header. For requests using transport encoding, this should be the compressed size. Examples:

  • 3495

Requirement level: Recommended

http.response.status_code StandardAttribute | null

HTTP response status code. Examples:

  • 200

Requirement level: Conditionally Required: If and only if one was received/sent.

network.protocol.name StandardAttribute | null

OSI application layer or non-OSI equivalent. Examples:

  • http
  • spdy

Requirement level: Recommended: if not default (http).

network.protocol.version StandardAttribute | null

Version of the protocol specified in network.protocol.name. Examples:

  • 1.0
  • 1.1
  • 2
  • 3

Requirement level: Recommended

network.transport StandardAttribute | null

OSI transport layer. Examples:

  • tcp
  • udp

Requirement level: Conditionally Required

network.type StandardAttribute | null

OSI network layer or non-OSI equivalent. Examples:

  • ipv4
  • ipv6

Requirement level: Recommended

http.route StandardAttribute | null

The matched route (path template in the format used by the respective server framework). Examples:

  • /graphql

Requirement level: Conditionally Required: If and only if it’s available

network.local.address StandardAttribute | null

Local socket address. Useful in case of a multi-IP host. Examples:

  • 10.1.2.80
  • /tmp/my.sock

Requirement level: Opt-In

network.local.port StandardAttribute | null

Local socket port. Useful in case of a multi-port host. Examples:

  • 65123

Requirement level: Opt-In

network.peer.address StandardAttribute | null

Peer address of the network connection - IP address or Unix domain socket name. Examples:

  • 10.1.2.80
  • /tmp/my.sock

Requirement level: Recommended

network.peer.port StandardAttribute | null

Peer port number of the network connection. Examples:

  • 65123

Requirement level: Recommended

server.address StandardAttribute | null

Name of the local HTTP server that received the request. Examples:

  • example.com
  • 10.1.2.80
  • /tmp/my.sock

Requirement level: Recommended

server.port StandardAttribute | null

Port of the local HTTP server that received the request. Examples:

  • 80
  • 8080
  • 443

Requirement level: Recommended

url.path StandardAttribute | null

The URI path component Examples:

  • /search

Requirement level: Required

url.query StandardAttribute | null

The URI query component Examples:

  • q=OpenTelemetry

Requirement level: Conditionally Required: If and only if one was received/sent.

url.scheme StandardAttribute | null

The URI scheme component identifying the used protocol. Examples:

  • http
  • https

Requirement level: Required

user_agent.original StandardAttribute | null

Value of the HTTP User-Agent header sent by the client. Examples:

  • CERN-LineMode/2.15
  • libwww/2.17b3

Requirement level: Recommended

StandardAttribute boolean | object
StandardEventConfigRouterSelector EventLevelConfig | object
ExtendedSupergraphEventsConfigWithEvent Record<string, object>
request

Log the supergraph request

All of: StandardEventConfigSupergraphSelector EventLevelConfig | object
response

Log the supergraph response

All of: StandardEventConfigSupergraphSelector EventLevelConfig | object
error

Log the supergraph error

All of: StandardEventConfigSupergraphSelector EventLevelConfig | object
Event2 object

An event that can be logged as part of a trace. The event has an implicit type attribute that matches the name of the event in the yaml and a message that can be used to provide additional information.

level required

The log level of the event.

All of: EventLevelConfig string
message string required

The event message.

on required

When to trigger the event.

All of: EventOn string | string | string | string
attributes

The event attributes.

condition

The event conditions.

All of: ConditionSupergraphSelector object | object | object | object | object | object | object | string | string

Attributes for Cost

graphql.document StandardAttribute | null

The GraphQL document being executed. Examples:

  • query findBookById { bookById(id: ?) { name } }

Requirement level: Recommended

graphql.operation.name StandardAttribute | null

The name of the operation being executed. Examples:

  • findBookById

Requirement level: Recommended

graphql.operation.type StandardAttribute | null

The type of the operation being executed. Examples:

  • query
  • subscription
  • mutation

Requirement level: Recommended

cost.estimated StandardAttribute | null

The estimated cost of the operation using the currently configured cost model

cost.actual StandardAttribute | null

The actual cost of the operation using the currently configured cost model

cost.delta StandardAttribute | null

The delta (estimated - actual) cost of the operation using the currently configured cost model

cost.result StandardAttribute | null

The cost result, this is an error code returned by the cost calculation or COST_OK

StandardEventConfigSupergraphSelector EventLevelConfig | object
ExtendedSubgraphEventsConfigWithEvent Record<string, object>
request

Log the subgraph request

All of: StandardEventConfigSubgraphSelector EventLevelConfig | object
response

Log the subgraph response

All of: StandardEventConfigSubgraphSelector EventLevelConfig | object
error

Log the subgraph error

All of: StandardEventConfigSubgraphSelector EventLevelConfig | object
Event3 object

An event that can be logged as part of a trace. The event has an implicit type attribute that matches the name of the event in the yaml and a message that can be used to provide additional information.

level required

The log level of the event.

All of: EventLevelConfig string
message string required

The event message.

on required

When to trigger the event.

All of: EventOn string | string | string | string
attributes

The event attributes.

condition

The event conditions.

All of: ConditionSubgraphSelector object | object | object | object | object | object | object | string | string
subgraph.name StandardAttribute | null

The name of the subgraph Examples:

  • products

Requirement level: Required

subgraph.graphql.document StandardAttribute | null

The GraphQL document being executed. Examples:

  • query findBookById { bookById(id: ?) { name } }

Requirement level: Recommended

subgraph.graphql.operation.name StandardAttribute | null

The name of the operation being executed. Examples:

  • findBookById

Requirement level: Recommended

subgraph.graphql.operation.type StandardAttribute | null

The type of the operation being executed. Examples:

  • query
  • subscription
  • mutation

Requirement level: Recommended

http.request.resend_count StandardAttribute | null

The number of times the request has been resent

StandardEventConfigSubgraphSelector EventLevelConfig | object
ExtendedConnectorEventsConfigWithEvent Record<string, object>
request

Log the connector HTTP request

All of: StandardEventConfigConnectorSelector EventLevelConfig | object
response

Log the connector HTTP response

All of: StandardEventConfigConnectorSelector EventLevelConfig | object
error

Log the connector HTTP error

All of: StandardEventConfigConnectorSelector EventLevelConfig | object
Event4 object

An event that can be logged as part of a trace. The event has an implicit type attribute that matches the name of the event in the yaml and a message that can be used to provide additional information.

level required

The log level of the event.

All of: EventLevelConfig string
message string required

The event message.

on required

When to trigger the event.

All of: EventOn string | string | string | string
attributes

The event attributes.

condition

The event conditions.

All of: ConditionConnectorSelector object | object | object | object | object | object | object | string | string
subgraph.name StandardAttribute | null

The name of the subgraph containing the connector Examples:

  • posts

Requirement level: Required

connector.source.name StandardAttribute | null

The name of the source for this connector, if defined Examples:

  • posts_api

Requirement level: Conditionally Required: If the connector has a source defined

connector.http.method StandardAttribute | null

The HTTP method for the connector Examples:

  • GET
  • POST

Requirement level: Required

connector.url.template StandardAttribute | null

The connector URL template, relative to the source base URL if one is defined Examples:

  • /users/{$this.id!}/post

Requirement level: Required

ConnectorSelector object | object | object | object | object | object | object | object | object | object | object | object | object | object | object
ConnectorSource string
MappingProblems string | string | string
ConditionConnectorSelector object | object | object | object | object | object | object | string | string

Specify a condition for when an instrument should be mutated or an event should be triggered.

ConnectorSelectorOrValue
StandardEventConfigConnectorSelector EventLevelConfig | object
Spans object
mode

Use new OpenTelemetry spec compliant span attributes or preserve existing. This will be defaulted in future to spec_compliant, eventually removed in future.

All of: SpanMode string | string
default_attribute_requirement_level

The attributes to include by default in spans based on their level as specified in the otel semantic conventions and Apollo documentation.

All of: DefaultAttributeRequirementLevel string | string | string
router

Configuration of router spans. Log events inherit attributes from the containing span, so attributes configured here will be included on log events for a request. Router spans contain http request and response information and therefore contain http specific attributes.

All of: RouterSpans object
supergraph

Configuration of supergraph spans. Supergraph spans contain information about the graphql request and response and therefore contain graphql specific attributes.

All of: SupergraphSpans object
subgraph

Attributes to include on the subgraph span. Subgraph spans contain information about the subgraph request and response and therefore contain subgraph specific attributes.

All of: SubgraphSpans object
connector

Attributes to include on the connector span. Connector spans contain information about the connector request and response and therefore contain connector specific attributes.

All of: ConnectorSpans object
http_client

Attributes to include on the HTTP client span. HTTP client spans contain information about HTTP requests made to subgraphs, including any changes made by Rhai scripts.

All of: HttpClientSpans object
SpanMode string | string

Span mode to create new or deprecated spans

DefaultAttributeRequirementLevel string | string | string
RouterSpans object
attributes

Custom attributes that are attached to the router span.

ExtendedRouterAttributesWithConditionalRouterSelector Record<string, RouterSelector | object>
dd.trace_id StandardAttribute | null

The datadog trace ID. This can be output in logs and used to correlate traces in Datadog.

trace_id StandardAttribute | null

The OpenTelemetry trace ID. This can be output in logs.

baggage boolean | null

All key values from trace baggage.

Default: null
error.type StandardAttribute | null

Describes a class of error the operation ended with. Examples:

  • timeout
  • name_resolution_error
  • 500

Requirement level: Conditionally Required: If request has ended with an error.

http.request.body.size StandardAttribute | null

The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the Content-Length header. For requests using transport encoding, this should be the compressed size. Examples:

  • 3495

Requirement level: Recommended

http.request.method StandardAttribute | null

HTTP request method. Examples:

  • GET
  • POST
  • HEAD

Requirement level: Required

http.response.body.size StandardAttribute | null

The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the Content-Length header. For requests using transport encoding, this should be the compressed size. Examples:

  • 3495

Requirement level: Recommended

http.response.status_code StandardAttribute | null

HTTP response status code. Examples:

  • 200

Requirement level: Conditionally Required: If and only if one was received/sent.

network.protocol.name StandardAttribute | null

OSI application layer or non-OSI equivalent. Examples:

  • http
  • spdy

Requirement level: Recommended: if not default (http).

network.protocol.version StandardAttribute | null

Version of the protocol specified in network.protocol.name. Examples:

  • 1.0
  • 1.1
  • 2
  • 3

Requirement level: Recommended

network.transport StandardAttribute | null

OSI transport layer. Examples:

  • tcp
  • udp

Requirement level: Conditionally Required

network.type StandardAttribute | null

OSI network layer or non-OSI equivalent. Examples:

  • ipv4
  • ipv6

Requirement level: Recommended

http.route StandardAttribute | null

The matched route (path template in the format used by the respective server framework). Examples:

  • /graphql

Requirement level: Conditionally Required: If and only if it’s available

network.local.address StandardAttribute | null

Local socket address. Useful in case of a multi-IP host. Examples:

  • 10.1.2.80
  • /tmp/my.sock

Requirement level: Opt-In

network.local.port StandardAttribute | null

Local socket port. Useful in case of a multi-port host. Examples:

  • 65123

Requirement level: Opt-In

network.peer.address StandardAttribute | null

Peer address of the network connection - IP address or Unix domain socket name. Examples:

  • 10.1.2.80
  • /tmp/my.sock

Requirement level: Recommended

network.peer.port StandardAttribute | null

Peer port number of the network connection. Examples:

  • 65123

Requirement level: Recommended

server.address StandardAttribute | null

Name of the local HTTP server that received the request. Examples:

  • example.com
  • 10.1.2.80
  • /tmp/my.sock

Requirement level: Recommended

server.port StandardAttribute | null

Port of the local HTTP server that received the request. Examples:

  • 80
  • 8080
  • 443

Requirement level: Recommended

url.path StandardAttribute | null

The URI path component Examples:

  • /search

Requirement level: Required

url.query StandardAttribute | null

The URI query component Examples:

  • q=OpenTelemetry

Requirement level: Conditionally Required: If and only if one was received/sent.

url.scheme StandardAttribute | null

The URI scheme component identifying the used protocol. Examples:

  • http
  • https

Requirement level: Required

user_agent.original StandardAttribute | null

Value of the HTTP User-Agent header sent by the client. Examples:

  • CERN-LineMode/2.15
  • libwww/2.17b3

Requirement level: Recommended

ConditionalRouterSelector RouterSelector | object
SupergraphSpans object
attributes

Custom attributes that are attached to the supergraph span.

ExtendedSupergraphAttributesWithConditionalSupergraphSelector Record<string, SupergraphSelector | object>

Attributes for Cost

graphql.document StandardAttribute | null

The GraphQL document being executed. Examples:

  • query findBookById { bookById(id: ?) { name } }

Requirement level: Recommended

graphql.operation.name StandardAttribute | null

The name of the operation being executed. Examples:

  • findBookById

Requirement level: Recommended

graphql.operation.type StandardAttribute | null

The type of the operation being executed. Examples:

  • query
  • subscription
  • mutation

Requirement level: Recommended

cost.estimated StandardAttribute | null

The estimated cost of the operation using the currently configured cost model

cost.actual StandardAttribute | null

The actual cost of the operation using the currently configured cost model

cost.delta StandardAttribute | null

The delta (estimated - actual) cost of the operation using the currently configured cost model

cost.result StandardAttribute | null

The cost result, this is an error code returned by the cost calculation or COST_OK

ConditionalSupergraphSelector SupergraphSelector | object
SubgraphSpans object
attributes

Custom attributes that are attached to the subgraph span.

ExtendedSubgraphAttributesWithConditionalSubgraphSelector Record<string, SubgraphSelector | object>
subgraph.name StandardAttribute | null

The name of the subgraph Examples:

  • products

Requirement level: Required

subgraph.graphql.document StandardAttribute | null

The GraphQL document being executed. Examples:

  • query findBookById { bookById(id: ?) { name } }

Requirement level: Recommended

subgraph.graphql.operation.name StandardAttribute | null

The name of the operation being executed. Examples:

  • findBookById

Requirement level: Recommended

subgraph.graphql.operation.type StandardAttribute | null

The type of the operation being executed. Examples:

  • query
  • subscription
  • mutation

Requirement level: Recommended

http.request.resend_count StandardAttribute | null

The number of times the request has been resent

ConditionalSubgraphSelector SubgraphSelector | object
ConnectorSpans object
attributes

Custom attributes that are attached to the connector span.

ExtendedConnectorAttributesWithConditionalConnectorSelector Record<string, ConnectorSelector | object>
subgraph.name StandardAttribute | null

The name of the subgraph containing the connector Examples:

  • posts

Requirement level: Required

connector.source.name StandardAttribute | null

The name of the source for this connector, if defined Examples:

  • posts_api

Requirement level: Conditionally Required: If the connector has a source defined

connector.http.method StandardAttribute | null

The HTTP method for the connector Examples:

  • GET
  • POST

Requirement level: Required

connector.url.template StandardAttribute | null

The connector URL template, relative to the source base URL if one is defined Examples:

  • /users/{$this.id!}/post

Requirement level: Required

ConditionalConnectorSelector ConnectorSelector | object
HttpClientSpans object
attributes

Custom attributes that are attached to the HTTP client span.

ExtendedHttpClientAttributesWithConditionalHttpClientSelector Record<string, HttpClientSelector | object>
ConditionalHttpClientSelector HttpClientSelector | object
HttpClientSelector object | object
ConditionHttpClientSelector object | object | object | object | object | object | object | string | string

Specify a condition for when an instrument should be mutated or an event should be triggered.

HttpClientSelectorOrValue
InstrumentsConfig object
default_requirement_level

The attributes and instruments to include by default in instruments based on their level as specified in the otel semantic conventions and Apollo documentation.

All of: DefaultAttributeRequirementLevel string | string | string
router

Router service instruments. For more information see documentation on Router lifecycle.

supergraph

Supergraph service instruments. For more information see documentation on Router lifecycle.

subgraph

Subgraph service instruments. For more information see documentation on Router lifecycle.

connector

Connector service instruments.

graphql

GraphQL response field instruments.

cache

Cache instruments

ExtendedRouterInstrumentsConfigWithInstrument Record<string, object>
http.server.request.duration

Histogram of server request duration

http.server.active_requests

Counter of active requests

All of: StandardInstrumentActiveRequestsAttributes null | boolean | object
http.server.request.body.size

Histogram of server request body size

http.server.response.body.size

Histogram of server response body size

apollo.router.overhead

Histogram of router overhead (time not spent in subgraph requests)

Instrument object
type required

The type of instrument.

All of: InstrumentType string | string
value required

The value of the instrument.

All of: RouterValue Standard | RouterSelector
description string required

The description of the instrument.

unit string required

The units of the instrument, e.g. "ms", "bytes", "requests".

attributes

Attributes to include on the instrument.

condition

The instrument conditions.

All of: ConditionRouterSelector object | object | object | object | object | object | object | string | string
InstrumentType string | string
RouterValue Standard | RouterSelector
Standard string
StandardInstrumentExtendedRouterAttributesWithRouterSelector null | boolean | object
StandardInstrumentActiveRequestsAttributes null | boolean | object
ActiveRequestsAttributes object
http.request.method boolean

The HTTP request method

Default: false
server.address boolean

The server address

Default: false
server.port boolean

The server port

Default: false
url.scheme boolean

The URL scheme

Default: false
StandardInstrumentExtendedRouterOverheadAttributesWithRouterSelector null | boolean | object

Empty attributes struct for router overhead - no standard attributes, only custom selectors

ExtendedSupergraphInstrumentsConfigWithInstrument Record<string, object>
cost.estimated

A histogram of the estimated cost of the operation using the currently configured cost model

cost.actual

A histogram of the actual cost of the operation using the currently configured cost model

cost.delta

A histogram of the delta between the estimated and actual cost of the operation using the currently configured cost model

Instrument2 object
type required

The type of instrument.

All of: InstrumentType string | string
value required

The value of the instrument.

All of: SupergraphValue Standard | Event5 | SupergraphSelector
description string required

The description of the instrument.

unit string required

The units of the instrument, e.g. "ms", "bytes", "requests".

attributes

Attributes to include on the instrument.

condition

The instrument conditions.

All of: ConditionSupergraphSelector object | object | object | object | object | object | object | string | string
SupergraphValue Standard | Event5 | SupergraphSelector
Event5 string | string | object
StandardInstrumentExtendedSupergraphAttributesWithSupergraphSelector null | boolean | object
ExtendedSubgraphInstrumentsConfigWithInstrument Record<string, object>
http.client.request.duration

Histogram of client request duration

http.client.request.body.size

Histogram of client request body size

http.client.response.body.size

Histogram of client response body size

Instrument3 object
type required

The type of instrument.

All of: InstrumentType string | string
value required

The value of the instrument.

All of: SubgraphValue Standard | SubgraphSelector
description string required

The description of the instrument.

unit string required

The units of the instrument, e.g. "ms", "bytes", "requests".

attributes

Attributes to include on the instrument.

condition

The instrument conditions.

All of: ConditionSubgraphSelector object | object | object | object | object | object | object | string | string
SubgraphValue Standard | SubgraphSelector
StandardInstrumentExtendedSubgraphAttributesWithSubgraphSelector null | boolean | object
ExtendedConnectorInstrumentsConfigWithInstrument Record<string, object>
http.client.request.duration

Histogram of client request duration

http.client.request.body.size

Histogram of client request body size

http.client.response.body.size

Histogram of client response body size

Instrument4 object
type required

The type of instrument.

All of: InstrumentType string | string
value required

The value of the instrument.

All of: ConnectorValue Standard | ConnectorSelector
description string required

The description of the instrument.

unit string required

The units of the instrument, e.g. "ms", "bytes", "requests".

attributes

Attributes to include on the instrument.

condition

The instrument conditions.

All of: ConditionConnectorSelector object | object | object | object | object | object | object | string | string
ConnectorValue Standard | ConnectorSelector
StandardInstrumentExtendedConnectorAttributesWithConnectorSelector null | boolean | object
ExtendedGraphQLInstrumentsConfigWithInstrument Record<string, object>
list.length

A histogram of the length of a selected field in the GraphQL response

field.execution

A counter of the number of times a field is used.

Instrument5 object
type required

The type of instrument.

All of: InstrumentType string | string
value required

The value of the instrument.

All of: GraphQLValue StandardUnit | GraphQLSelector
description string required

The description of the instrument.

unit string required

The units of the instrument, e.g. "ms", "bytes", "requests".

attributes

Attributes to include on the instrument.

condition

The instrument conditions.

All of: ConditionGraphQLSelector object | object | object | object | object | object | object | string | string
GraphQLValue StandardUnit | GraphQLSelector
StandardUnit string
GraphQLSelector object | object | object | object | object | object
ListLength string
FieldName string
FieldType string | string
TypeName string
ExtendedGraphQLAttributesWithGraphQLSelector Record<string, object | object | object | object | object | object>
graphql.field.name StandardAttribute | null

The GraphQL field name

graphql.field.type StandardAttribute | null

The GraphQL field type

graphql.list.length StandardAttribute | null

If the field is a list, the length of the list

graphql.operation.name StandardAttribute | null

The GraphQL operation name

graphql.type.name StandardAttribute | null

The GraphQL type name

ConditionGraphQLSelector object | object | object | object | object | object | object | string | string

Specify a condition for when an instrument should be mutated or an event should be triggered.

GraphQLSelectorOrValue
StandardInstrumentExtendedGraphQLAttributesWithGraphQLSelector null | boolean | object
ExtendedCacheInstrumentsConfigWithInstrument Record<string, object>
apollo.router.operations.entity.cache

A counter of times we have a cache hit or cache miss (deprecated)

apollo.router.response.cache

A counter of times we have a cache hit or cache miss

Instrument6 object
type required

The type of instrument.

All of: InstrumentType string | string
value required

The value of the instrument.

All of: SubgraphValue Standard | SubgraphSelector
description string required

The description of the instrument.

unit string required

The units of the instrument, e.g. "ms", "bytes", "requests".

attributes

Attributes to include on the instrument.

condition

The instrument conditions.

All of: ConditionSubgraphSelector object | object | object | object | object | object | object | string | string
StandardInstrumentExtendedCacheAttributesWithSubgraphSelector null | boolean | object
TrafficShapingConfig object

Configuration for the traffic shaping plugin

router RouterShaping | null

Applied at the router level

all SubgraphShaping | null

Applied on all subgraphs

subgraphs Record<string, object>

Applied on specific subgraphs

connector

Applied on specific subgraphs

All of: ConnectorsShapingConfig object
deduplicate_variables boolean | null

DEPRECATED, now always enabled: Enable variable deduplication optimization when sending requests to subgraphs (https://github.com/apollographql/router/issues/87)

Default: null
RouterShaping object
concurrency_limit integer | null

The global concurrency limit

format=uintmin=0
global_rate_limit RateLimitConf | null

Enable global rate limiting

timeout string

Enable timeout for incoming requests

Default: null
RateLimitConf object
capacity integer required

Number of requests allowed

format=uint64min=1
interval string required

Per interval

SubgraphShaping object

Traffic shaping options

deduplicate_query boolean | null

Enable query deduplication

compression Compression | null

Enable compression for subgraphs (available compressions are deflate, br, gzip)

global_rate_limit RateLimitConf | null

Enable global rate limiting

timeout string

Enable timeout for incoming requests

Default: null
experimental_http2 Http2Config | null

Enable HTTP2 for subgraphs

dns_resolution_strategy DnsResolutionStrategy | null

DNS resolution strategy for subgraphs

Compression string | string | string | string
ConnectorsShapingConfig object
all ConnectorShaping | null

Applied on all connectors

sources Record<string, object>

Applied on specific connector sources

ConnectorShaping object
compression Compression | null

Enable compression for connectors (available compressions are deflate, br, gzip)

global_rate_limit RateLimitConf | null

Enable global rate limiting

timeout string

Enable timeout for connectors requests

Default: null
experimental_http2 Http2Config | null

Enable HTTP2 for connectors

dns_resolution_strategy DnsResolutionStrategy | null

DNS resolution strategy for connectors

Batching object

Configuration for Batching

mode required

Batching mode

All of: BatchingMode string
enabled boolean

Activates Batching (disabled by default)

Default: false

Subgraph options for batching

maximum_size integer | null

Maximum size for a batch

Default: null
format=uintmin=0
BatchingMode string
SubgraphCommonBatchingConfigConfiguration object

Configuration options pertaining to the subgraph server component.

all

options applying to all subgraphs

Default:
{
  "enabled": false
}
All of: CommonBatchingConfig object
subgraphs Record<string, object>

per subgraph options

Default:
{}
CommonBatchingConfig object

Common options for configuring subgraph batching

enabled boolean required

Whether this batching config should be enabled