Apollo Router
Apollo Router: The runtime for graph-based API orchestration
apollo-router-*.json
Validate
Check your file against this schema
Opens the validator with this schema already loaded. Paste your
apollo-router-*.json and it validates in your browser — nothing is uploaded.
Reference
Fields
Generated directly from the schema, following local
$refs, to two levels of nesting.
| Field | Type | Description |
|---|---|---|
health_check | object | Configuration options pertaining to the health component. |
health_check.listen | allOf | The socket address and port to listen on Defaults to 127.0.0.1:8088 default: "127.0.0.1:8088" |
health_check.enabled | boolean | Set to false to disable the health check default: true |
health_check.path | string | Optionally set a custom healthcheck path Defaults to /health default: "/health" |
health_check.readiness | allOf | Optionally specify readiness configuration default: {"interval": {"sampling": "5s", "unready": null}… |
sandbox | allOf | Sandbox configuration default: {"enabled": false} |
homepage | allOf | Homepage configuration default: {"enabled": true, "graph_ref": null} |
server | allOf | Configuration for the server default: {"http": {"header_read_timeout": {"secs": 10, "nanos": 0}}} |
supergraph | allOf | Configuration for the supergraph default: {"listen": "127.0.0.1:4000", "connection_shutdown_timeout"… |
cors | allOf | Cross origin request headers. default: {"allow_any_origin": false, "allow_credentials": false… |
tls | allOf | — default: {"supergraph": null, "subgraph": {"all"… |
apq | allOf | Configures automatic persisted queries default: {"enabled": true, "router": {"cache": {"in_memory"… |
persisted_queries | allOf | Configures managed persisted queries default: {"enabled": false, "log_unknown": false, "safelist"… |
limits | object | Configuration for operation limits, parser limits, HTTP limits, etc. |
limits.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,˛ default: null |
limits.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 default: null |
limits.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 default: null |
limits.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 |
limits.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 |
limits.parser_max_recursion | integer | Limit recursion in the GraphQL parser to protect against stack overflow. default: 500 default: 500 |
limits.parser_max_tokens | integer | Limit the number of tokens the GraphQL parser processes before aborting. default: 15000 |
limits.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 |
limits.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 |
limits.http1_max_request_buf_size | string | null | Limit the maximum buffer size for the HTTP1 connection. Default is ~400kib. default: null |
limits.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 |
limits.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 | allOf | 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} |
plugins | allOf | Plugin configuration default: null |
authentication | object | Authentication |
authentication.router | anyOf | Router configuration |
authentication.subgraph | anyOf | Subgraph configuration |
authentication.connector | anyOf | Connector configuration |
authorization | object | Authorization plugin |
authorization.require_authentication | boolean | Reject unauthenticated requests default: false |
authorization.directives | allOf | `@authenticated`, `@requiresScopes` and `@policy` directives |
connectors | object | Configuration for Apollo Connectors. https://www.apollographql.com/docs/graphos/routing/configuration/yaml#connectors |
connectors.subgraphsdeprecated | object | A map of subgraph name to connectors config for that subgraph default: {} |
connectors.sources | object | Map of subgraph_name.connector_source_name to source configuration default: {} |
connectors.debug_extensions | boolean | Enables connector debugging information on response extensions if the feature is enabled default: false |
connectors.max_requests_per_operation_per_source | integer | null | The maximum number of requests for a connector source default: null |
connectors.expose_sources_in_context | boolean | When enabled, adds an entry to the context for use in coprocessors ```json { "context": { "entries": { "apollo_connectors::sources_in_query_plan": [ { "subgraph_name": "subgraph", "source_name": "source" } ] } } } ``` default: false |
connectors.preview_connect_v0_2deprecated | boolean | null | Enables Connect spec v0.2 during the preview. default: null |
connectors.preview_connect_v0_3deprecated | 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 |
connectors.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 |
coprocessor.urlrequired | string | The url you'd like to offload processing to (can be overridden per-stage) |
coprocessor.client | anyOf | — |
coprocessor.timeout | string | The timeout for external requests default: {"secs": 1, "nanos": 0} |
coprocessor.response_validation | boolean | Response validation defaults to true default: true |
coprocessor.router | allOf | The router stage request/response configuration |
coprocessor.supergraph | allOf | The supergraph stage request/response configuration |
coprocessor.execution | allOf | The execution stage request/response configuration |
coprocessor.subgraph | allOf | The subgraph stage request/response configuration |
csrf | object | CSRF protection configuration. See <https://owasp.org/www-community/attacks/csrf> for an explanation on CSRF attacks. |
csrf.unsafe_disabled | boolean | The CSRF plugin is enabled by default. Setting `unsafe_disabled: true` *disables* CSRF protection. default: false |
csrf.required_headers | array<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 default: ["x-apollo-operation-name", "apollo-require-preflight"] |
demand_control | object | Demand control configuration |
demand_control.enabledrequired | boolean | Enable demand control |
demand_control.moderequired | allOf | 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 |
demand_control.strategyrequired | allOf | The strategy used to reject requests. |
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 |
experimental_diagnostics.enabled | boolean | Enable the diagnostics plugin default: false |
experimental_diagnostics.listen | allOf | 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" |
experimental_diagnostics.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 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 |
headers.all | anyOf | Rules to apply to all subgraphs |
headers.subgraphs | object | Rules to specific subgraphs |
headers.connector | allOf | Rules for connectors |
include_subgraph_errors | object | Configuration for exposing errors that originate from subgraphs |
include_subgraph_errors.all | allOf | Global configuration for error redaction. Applies to all subgraphs. default: false |
include_subgraph_errors.subgraphs | object | Overrides global configuration on a per-subgraph basis default: {} |
license_enforcement | object | The license enforcement plugin has no configuration. |
override_subgraph_url | anyOf | Subgraph URL mappings |
preview_entity_cache | object | Configuration for entity caching |
preview_entity_cache.enabled | boolean | Enable or disable the entity caching feature default: false |
preview_entity_cache.expose_keys_in_context | boolean | Expose cache keys in context default: false |
preview_entity_cache.subgraphrequired | allOf | Configure invalidation per subgraph |
preview_entity_cache.invalidation | anyOf | Global invalidation configuration |
preview_entity_cache.metrics | allOf | Entity caching evaluation metrics |
preview_file_uploads | object | Configuration for File Uploads plugin |
preview_file_uploads.enabledrequired | boolean | Whether the file upload plugin should be enabled (default: false) |
preview_file_uploads.protocolsrequired | allOf | Supported protocol configurations for file uploads |
progressive_override | object | Configuration for the progressive override plugin |
rhai | object | Configuration for the Rhai Plugin |
rhai.scripts | string | null | The directory where Rhai scripts can be found |
rhai.main | string | null | The main entry point for Rhai script evaluation |
subscription | object | Subscriptions configuration |
subscription.enabled | boolean | Enable subscription default: true |
subscription.mode | allOf | Select a subscription mode (callback or passthrough) default: {"callback": null, "passthrough": null} |
subscription.deduplication | allOf | Configure subgraph subscription deduplication default: {"enabled": true, "ignored_headers": []} |
subscription.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 |
subscription.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 |
telemetry | object | Telemetry configuration |
telemetry.apollo | allOf | Apollo reporting configuration |
telemetry.exporters | allOf | Instrumentation configuration |
telemetry.instrumentation | allOf | Instrumentation configuration |
traffic_shaping | object | Configuration for the traffic shaping plugin |
traffic_shaping.router | anyOf | Applied at the router level |
traffic_shaping.all | anyOf | Applied on all subgraphs |
traffic_shaping.subgraphs | object | Applied on specific subgraphs |
traffic_shaping.connector | allOf | Applied on specific subgraphs |
traffic_shaping.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 | allOf | Batching configuration. default: {"enabled": false, "mode": "batch_http_link", "subgraph"… |
experimental_type_conditioned_fetching | boolean | Type conditioned fetching configuration. default: false |
Audit
What we found in this schema
- Declared draft: draft-07
- Validates cleanly against its own meta-schema.
- 1022 properties, 88% carrying a description, max nesting depth 11.
Standards
Specification sections for the keywords in this schema
| Keyword | Document | Section |
|---|---|---|
$ref | JSON Schema Core, draft 2020-12 | §8.2.3.1 — Direct References with "$ref" |
additionalProperties | JSON Schema Core, draft 2020-12 | §10.3.2.3 — "additionalProperties" |
allOf | JSON Schema Core, draft 2020-12 | §10.2.1.1 — "allOf" |
anyOf | JSON Schema Core, draft 2020-12 | §10.2.1.2 — "anyOf" |
const | JSON Schema Validation, draft 2020-12 | §6.1.3 — "const" |
default | JSON Schema Validation, draft 2020-12 | §9.2 — "default" |
description | JSON Schema Validation, draft 2020-12 | §9.1 — "title" and "description" |
enum | JSON Schema Validation, draft 2020-12 | §6.1.2 — "enum" |
format | JSON Schema Validation, draft 2020-12 | §7 — Vocabularies for Semantic Content With "format" |
items | JSON Schema Core, draft 2020-12 | §10.3.1.2 — "items" |
maxItems | JSON Schema Validation, draft 2020-12 | §6.4.1 — "maxItems" |
minItems | JSON Schema Validation, draft 2020-12 | §6.4.2 — "minItems" |
minimum | JSON Schema Validation, draft 2020-12 | §6.2.4 — "minimum" |
oneOf | JSON Schema Core, draft 2020-12 | §10.2.1.3 — "oneOf" |
properties | JSON Schema Core, draft 2020-12 | §10.3.2.1 — "properties" |
required | JSON Schema Validation, draft 2020-12 | §6.5.3 — "required" |
type | JSON Schema Validation, draft 2020-12 | §6.1.1 — "type" |
uniqueItems | JSON Schema Validation, draft 2020-12 | §6.4.3 — "uniqueItems" |
writeOnly | JSON Schema Validation, draft 2020-12 | §9.4 — "readOnly" and "writeOnly" |
format: "uri" | RFC 3986 (STD 66) | §3 — Syntax Components |
Documents
- JSON Schema Core, draft 2020-12 — JSON Schema: A Media Type for Describing JSON Documents, A. Wright, H. Andrews, B. Hutton, G. Dennis, Eds., 2022. draft-bhutton-json-schema-01. An expired Internet-Draft with no formal standing in the IETF standards process; it is nonetheless the specification of record for JSON Schema 2020-12, published by json-schema.org.
- JSON Schema Validation, draft 2020-12 — JSON Schema Validation: A Vocabulary for Structural Validation of JSON, A. Wright, H. Andrews, B. Hutton, Eds., 2022.
- RFC 8259 (STD 90) — The JavaScript Object Notation (JSON) Data Interchange Format, T. Bray, Ed., 2017. The format a schema describes.
- RFC 6901 — JavaScript Object Notation (JSON) Pointer. Defines the pointer syntax used by $ref fragments and the ~0 / ~1 escapes.
Source
Attribution
This schema comes from SchemaStore, distributed under the Apache License 2.0. Copyright 2015–present Mads Kristensen and contributors. View the original file. The field table and audit on this page are generated by JSONTools.tools; the schema itself is unmodified.