Setting the file. One moment. Production · Apollo Router · apollographql/skills · Skills Docs ·
This file
- Number
- 8.9
- Position
- 9 of 27
- Type
- YAML
- Size
- 4 KB
- Lines
- 129
templates/v1/production.yaml
YAML·129 lines·4 KB
cache
:
14 in_memory:
15 limit: 512
16
17sandbox:
18 enabled: false
19
20homepage:
21 enabled: false
22
23health_check:
24 enabled: true
25 listen: 0.0.0.0:8088
26 path: /health
27
28include_subgraph_errors:
29 all: false
30
31# ── CORS (v1 flat schema) ──────────────────────────────────────
32cors:
33 origins:
34 - https://app.example.com
35 - https://studio.apollographql.com
36 allow_headers:
37 - Content-Type
38 - Authorization
39 methods:
40 - GET
41 - POST
42 - OPTIONS
43 allow_credentials: true
44 max_age: 24h
45
46# ── Authentication (v1: issuer is singular string) ─────────────
47authentication:
48 router:
49 jwt:
50 jwks:
51 - url: ${env.JWKS_URL}
52 issuer: ${env.JWT_ISSUER}
53
54authorization:
55 require_authentication: true
56
57# ── Operation Limits (v1.17+ uses `limits`, not `preview_operation_limits`) ──
58# Tip: Start with warn_only: true to observe real traffic, then enforce.
59# Router default for max_depth is 100; 50 is a balanced starting point.
60limits:
61 http_max_request_bytes: 2000000
62 max_depth: 50
63 max_height: 200
64 max_aliases: 30
65 max_root_fields: 20
66 # warn_only: true # Uncomment during initial rollout to log without rejecting
67
68# ── Traffic Shaping ────────────────────────────────────────────
69traffic_shaping:
70 router:
71 timeout: 60s
72 global_rate_limit:
73 capacity: 1000
74 interval: 1s
75 all:
76 timeout: 30s
77
78# ── Header Propagation ─────────────────────────────────────────
79headers:
80 all:
81 request:
82 - propagate:
83 matching: "^(authorization|x-.*)$"
84
85# ── APQ ────────────────────────────────────────────────────────
86apq:
87 enabled: true
88 router:
89 cache:
90 in_memory:
91 limit: 512
92
93# ── Telemetry ──────────────────────────────────────────────────
94telemetry:
95 apollo:
96 client_name_header: apollographql-client-name
97 client_version_header: apollographql-client-version
98
99 exporters:
100 logging:
101 stdout:
102 enabled: true
103 format: json
104
105 metrics:
106 prometheus:
107 enabled: true
108 listen: 0.0.0.0:9090
109 path: /metrics
110
111 tracing:
112 otlp:
113 enabled: true
114 endpoint: ${env.OTEL_COLLECTOR_ENDPOINT:-http://otel-collector:4317}
115 protocol: grpc
116 common:
117 service_name: apollo-router
118 sampler: 0.1
119 propagation:
120 trace_context: true
121
122 instrumentation:
123 spans:
124 router:
125 attributes:
126 environment:
127 static_value: ${env.ENVIRONMENT:-production}
128 client:
129 request_header: x-client-id