-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrouter.yaml
45 lines (37 loc) · 1.53 KB
/
router.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
supergraph:
listen: 127.0.0.1:4000
introspection: false
homepage:
enabled: true
sandbox:
enabled: false
plugins:
# Enable with the header, Apollo-Expose-Query-Plan: true
experimental.expose_query_plan: true
experimental_batching:
enabled: true
mode: batch_http_link
# We are running the server in a Lambda, so we have no need for a health check endpoint.
health_check:
enabled: false
# Propogate all headers to the subgraphs.
headers:
all:
request:
- propagate:
matching: .*
traffic_shaping:
all:
deduplicate_query: true # Enable query deduplication for all subgraphs.
experimental_retry:
min_per_sec: 10 # minimal number of retries per second (`min_per_sec`, default is 10 retries per second)
ttl: 10s # for each successful request, we register a token, that expires according to this option (default: 10s)
retry_percent: 0.2 # defines the proportion of available retries to the current number of tokens
retry_mutations: false # allows retries on mutations. This should only be enabled if mutations are idempotent
# Support setting the path to each subgraph via environment variables. This will override the
# ones defined in the composed supergraph.graphql schema. See more at
# https://www.apollographql.com/docs/router/configuration/overview/#subgraph-routing-urls.
override_subgraph_url:
users: '${env.SUBGRAPH_USERS_URL:-http://127.0.0.1:3065/}'
products: '${env.SUBGRAPH_PRODUCTS_URL:-http://127.0.0.1:3075/}'
reviews: '${env.SUBGRAPH_REVIEWS_URL:-http://127.0.0.1:3085/}'