|
15 | 15 | |[**override\_subgraph\_urls**](#override_subgraph_urls)|`object`|Configuration for overriding subgraph URLs.<br/>Default: `{}`<br/>|| |
16 | 16 | |[**query\_planner**](#query_planner)|`object`|Query planning configuration.<br/>Default: `{"allow_expose":false,"timeout":"10s"}`<br/>|| |
17 | 17 | |[**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":"50s"}`<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":"50s","request_timeout":{"Duration":"15s"}},"max_connections_per_host":100}`<br/>|| |
19 | 19 |
|
20 | 20 | **Additional Properties:** not allowed |
21 | 21 | **Example** |
@@ -107,9 +107,12 @@ query_planner: |
107 | 107 | timeout: 10s |
108 | 108 | supergraph: {} |
109 | 109 | traffic_shaping: |
110 | | - dedupe_enabled: true |
| 110 | + all: |
| 111 | + dedupe_enabled: true |
| 112 | + pool_idle_timeout: 50s |
| 113 | + request_timeout: |
| 114 | + Duration: 15s |
111 | 115 | max_connections_per_host: 100 |
112 | | - pool_idle_timeout: 50s |
113 | 116 |
|
114 | 117 | ``` |
115 | 118 |
|
@@ -1815,18 +1818,70 @@ Configuration for the traffic-shaping of the executor. Use these configurations |
1815 | 1818 |
|
1816 | 1819 | |Name|Type|Description|Required| |
1817 | 1820 | |----|----|-----------|--------| |
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":"50s","request_timeout":{"Duration":"15s"}}`<br/>|| |
1819 | 1822 | |**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: 50s |
| 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/>|| |
1820 | 1849 | |**pool\_idle\_timeout**|`string`|Timeout for idle sockets being kept-alive.<br/>Default: `"50s"`<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/>|| |
1821 | 1851 |
|
1822 | 1852 | **Additional Properties:** not allowed |
1823 | 1853 | **Example** |
1824 | 1854 |
|
1825 | 1855 | ```yaml |
1826 | 1856 | dedupe_enabled: true |
1827 | | -max_connections_per_host: 100 |
1828 | 1857 | pool_idle_timeout: 50s |
| 1858 | +request_timeout: |
| 1859 | + Duration: 15s |
1829 | 1860 |
|
1830 | 1861 | ``` |
1831 | 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`||yes| |
| 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`, `null`|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/>|no| |
| 1883 | +|**pool\_idle\_timeout\_seconds**|`string`|Timeout for idle sockets being kept-alive.<br/>|yes| |
| 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/>|no| |
| 1885 | + |
| 1886 | +**Additional Properties:** not allowed |
1832 | 1887 |
|
0 commit comments