Skip to content

Commit 59202c1

Browse files
committed
Lets go
1 parent 8c2418f commit 59202c1

File tree

1 file changed

+70
-5
lines changed

1 file changed

+70
-5
lines changed

docs/README.md

Lines changed: 70 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
|[**override\_subgraph\_urls**](#override_subgraph_urls)|`object`|Configuration for overriding subgraph URLs.<br/>Default: `{}`<br/>||
1616
|[**query\_planner**](#query_planner)|`object`|Query planning configuration.<br/>Default: `{"allow_expose":false,"timeout":"10s"}`<br/>||
1717
|[**supergraph**](#supergraph)|`object`|Configuration for the Federation supergraph source. By default, the router will use a local file-based supergraph source (`./supergraph.graphql`).<br/>||
18-
|[**traffic\_shaping**](#traffic_shaping)|`object`|Configuration for the traffic-shaping of the executor. Use these configurations to control how requests are being executed to subgraphs.<br/>Default: `{"dedupe_enabled":true,"max_connections_per_host":100,"pool_idle_timeout_seconds":50}`<br/>||
18+
|[**traffic\_shaping**](#traffic_shaping)|`object`|Configuration for the traffic-shaping of the executor. Use these configurations to control how requests are being executed to subgraphs.<br/>Default: `{"all":{"dedupe_enabled":true,"pool_idle_timeout_seconds":50,"request_timeout":{"Duration":"15s"}},"max_connections_per_host":100}`<br/>||
1919

2020
**Additional Properties:** not allowed
2121
**Example**
@@ -107,9 +107,12 @@ query_planner:
107107
timeout: 10s
108108
supergraph: {}
109109
traffic_shaping:
110-
dedupe_enabled: true
110+
all:
111+
dedupe_enabled: true
112+
pool_idle_timeout_seconds: 50
113+
request_timeout:
114+
Duration: 15s
111115
max_connections_per_host: 100
112-
pool_idle_timeout_seconds: 50
113116

114117
```
115118

@@ -1815,17 +1818,79 @@ Configuration for the traffic-shaping of the executor. Use these configurations
18151818

18161819
|Name|Type|Description|Required|
18171820
|----|----|-----------|--------|
1818-
|**dedupe\_enabled**|`boolean`|Enables/disables request deduplication to subgraphs.<br/><br/>When requests exactly matches the hashing mechanism (e.g., subgraph name, URL, headers, query, variables), and are executed at the same time, they will<br/>be deduplicated by sharing the response of other in-flight requests.<br/>Default: `true`<br/>||
1821+
|[**all**](#traffic_shapingall)|`object`|The default configuration that will be applied to all subgraphs, unless overridden by a specific subgraph configuration.<br/>Default: `{"dedupe_enabled":true,"pool_idle_timeout_seconds":50,"request_timeout":{"Duration":"15s"}}`<br/>||
18191822
|**max\_connections\_per\_host**|`integer`|Limits the concurrent amount of requests/connections per host/subgraph.<br/>Default: `100`<br/>Format: `"uint"`<br/>Minimum: `0`<br/>||
1823+
|[**subgraphs**](#traffic_shapingsubgraphs)|`object`|Optional per-subgraph configurations that will override the default configuration for specific subgraphs.<br/>||
1824+
1825+
**Additional Properties:** not allowed
1826+
**Example**
1827+
1828+
```yaml
1829+
all:
1830+
dedupe_enabled: true
1831+
pool_idle_timeout_seconds: 50
1832+
request_timeout:
1833+
Duration: 15s
1834+
max_connections_per_host: 100
1835+
1836+
```
1837+
1838+
<a name="traffic_shapingall"></a>
1839+
### traffic\_shaping\.all: object
1840+
1841+
The default configuration that will be applied to all subgraphs, unless overridden by a specific subgraph configuration.
1842+
1843+
1844+
**Properties**
1845+
1846+
|Name|Type|Description|Required|
1847+
|----|----|-----------|--------|
1848+
|**dedupe\_enabled**|`boolean`|Enables/disables request deduplication to subgraphs.<br/><br/>When requests exactly matches the hashing mechanism (e.g., subgraph name, URL, headers, query, variables), and are executed at the same time, they will<br/>be deduplicated by sharing the response of other in-flight requests.<br/>Default: `true`<br/>||
18201849
|**pool\_idle\_timeout\_seconds**|`integer`|Timeout for idle sockets being kept-alive.<br/>Default: `50`<br/>Format: `"uint64"`<br/>Minimum: `0`<br/>||
1850+
|**request\_timeout**||Optional timeout configuration for requests to subgraphs.<br/><br/>Example with a fixed duration:<br/>```yaml<br/> timeout:<br/> duration: 5s<br/>```<br/><br/>Or with a VRL expression that can return a duration based on the operation kind:<br/>```yaml<br/> timeout:<br/> expression: \|<br/> if (.request.operation.type == "mutation") {<br/> "10s"<br/> } else {<br/> "15s"<br/> }<br/>```<br/>Default: `{"Duration":"15s"}`<br/>||
1851+
1852+
**Additional Properties:** not allowed
1853+
**Example**
1854+
1855+
```yaml
1856+
dedupe_enabled: true
1857+
pool_idle_timeout_seconds: 50
1858+
request_timeout:
1859+
Duration: 15s
1860+
1861+
```
1862+
1863+
<a name="traffic_shapingsubgraphs"></a>
1864+
### traffic\_shaping\.subgraphs: object
1865+
1866+
Optional per-subgraph configurations that will override the default configuration for specific subgraphs.
1867+
1868+
1869+
**Additional Properties**
1870+
1871+
|Name|Type|Description|Required|
1872+
|----|----|-----------|--------|
1873+
|[**Additional Properties**](#traffic_shapingsubgraphsadditionalproperties)|`object`|||
1874+
1875+
<a name="traffic_shapingsubgraphsadditionalproperties"></a>
1876+
#### traffic\_shaping\.subgraphs\.additionalProperties: object
1877+
1878+
**Properties**
1879+
1880+
|Name|Type|Description|Required|
1881+
|----|----|-----------|--------|
1882+
|**dedupe\_enabled**|`boolean`|Enables/disables request deduplication to subgraphs.<br/><br/>When requests exactly matches the hashing mechanism (e.g., subgraph name, URL, headers, query, variables), and are executed at the same time, they will<br/>be deduplicated by sharing the response of other in-flight requests.<br/>Default: `true`<br/>||
1883+
|**pool\_idle\_timeout\_seconds**|`integer`|Timeout for idle sockets being kept-alive.<br/>Default: `50`<br/>Format: `"uint64"`<br/>Minimum: `0`<br/>||
1884+
|**request\_timeout**||Optional timeout configuration for requests to subgraphs.<br/><br/>Example with a fixed duration:<br/>```yaml<br/> timeout:<br/> duration: 5s<br/>```<br/><br/>Or with a VRL expression that can return a duration based on the operation kind:<br/>```yaml<br/> timeout:<br/> expression: \|<br/> if (.request.operation.type == "mutation") {<br/> "10s"<br/> } else {<br/> "15s"<br/> }<br/>```<br/>Default: `{"Duration":"15s"}`<br/>||
18211885

18221886
**Additional Properties:** not allowed
18231887
**Example**
18241888

18251889
```yaml
18261890
dedupe_enabled: true
1827-
max_connections_per_host: 100
18281891
pool_idle_timeout_seconds: 50
1892+
request_timeout:
1893+
Duration: 15s
18291894
18301895
```
18311896

0 commit comments

Comments
 (0)