@graphql-tools/federation 3.1.7 → 3.2.0-alpha-3eda996dbaed4825547586de32eac9bfef4df6e3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/index.cjs +8 -7
- package/dist/index.js +8 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @graphql-tools/federation
|
|
2
2
|
|
|
3
|
+
## 3.2.0-alpha-3eda996dbaed4825547586de32eac9bfef4df6e3
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#946](https://github.com/graphql-hive/gateway/pull/946) [`4f3add2`](https://github.com/graphql-hive/gateway/commit/4f3add29d7f8134a351286bf551e3393b32783d5) Thanks [@ardatan](https://github.com/ardatan)! - As Apollo suggests and uses in their implementation, we set the request timeout to 30 seconds for GraphOS uplinks
|
|
8
|
+
|
|
3
9
|
## 3.1.7
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -1524,12 +1524,13 @@ async function fetchSupergraphSdlFromManagedFederation(options = {}) {
|
|
|
1524
1524
|
`
|
|
1525
1525
|
),
|
|
1526
1526
|
variables
|
|
1527
|
-
})
|
|
1527
|
+
}),
|
|
1528
|
+
signal: AbortSignal.timeout(3e4)
|
|
1528
1529
|
});
|
|
1529
1530
|
const responseBody = await response.text();
|
|
1530
1531
|
if (!response.ok) {
|
|
1531
1532
|
throw new Error(
|
|
1532
|
-
`Failed to fetch supergraph SDL from
|
|
1533
|
+
`Failed to fetch supergraph SDL from '${upLink}' due to an HTTP error (${response.status}) ${responseBody}`
|
|
1533
1534
|
);
|
|
1534
1535
|
}
|
|
1535
1536
|
let result;
|
|
@@ -1537,20 +1538,20 @@ async function fetchSupergraphSdlFromManagedFederation(options = {}) {
|
|
|
1537
1538
|
result = JSON.parse(responseBody);
|
|
1538
1539
|
} catch (err) {
|
|
1539
1540
|
throw new Error(
|
|
1540
|
-
`Failed to parse response from
|
|
1541
|
+
`Failed to parse response from '${upLink}': ${err.message}
|
|
1541
1542
|
|
|
1542
1543
|
${responseBody}`
|
|
1543
1544
|
);
|
|
1544
1545
|
}
|
|
1545
1546
|
if (result.errors) {
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
`Failed to fetch supergraph SDL from
|
|
1547
|
+
throw new AggregateError(
|
|
1548
|
+
result.errors,
|
|
1549
|
+
`Failed to fetch supergraph SDL from '${upLink}'`
|
|
1549
1550
|
);
|
|
1550
1551
|
}
|
|
1551
1552
|
if (!result.data?.routerConfig) {
|
|
1552
1553
|
throw new Error(
|
|
1553
|
-
`Failed to fetch supergraph SDL from
|
|
1554
|
+
`Failed to fetch supergraph SDL from '${upLink}': ${responseBody}`
|
|
1554
1555
|
);
|
|
1555
1556
|
}
|
|
1556
1557
|
const { routerConfig } = result.data;
|
package/dist/index.js
CHANGED
|
@@ -1522,12 +1522,13 @@ async function fetchSupergraphSdlFromManagedFederation(options = {}) {
|
|
|
1522
1522
|
`
|
|
1523
1523
|
),
|
|
1524
1524
|
variables
|
|
1525
|
-
})
|
|
1525
|
+
}),
|
|
1526
|
+
signal: AbortSignal.timeout(3e4)
|
|
1526
1527
|
});
|
|
1527
1528
|
const responseBody = await response.text();
|
|
1528
1529
|
if (!response.ok) {
|
|
1529
1530
|
throw new Error(
|
|
1530
|
-
`Failed to fetch supergraph SDL from
|
|
1531
|
+
`Failed to fetch supergraph SDL from '${upLink}' due to an HTTP error (${response.status}) ${responseBody}`
|
|
1531
1532
|
);
|
|
1532
1533
|
}
|
|
1533
1534
|
let result;
|
|
@@ -1535,20 +1536,20 @@ async function fetchSupergraphSdlFromManagedFederation(options = {}) {
|
|
|
1535
1536
|
result = JSON.parse(responseBody);
|
|
1536
1537
|
} catch (err) {
|
|
1537
1538
|
throw new Error(
|
|
1538
|
-
`Failed to parse response from
|
|
1539
|
+
`Failed to parse response from '${upLink}': ${err.message}
|
|
1539
1540
|
|
|
1540
1541
|
${responseBody}`
|
|
1541
1542
|
);
|
|
1542
1543
|
}
|
|
1543
1544
|
if (result.errors) {
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
`Failed to fetch supergraph SDL from
|
|
1545
|
+
throw new AggregateError(
|
|
1546
|
+
result.errors,
|
|
1547
|
+
`Failed to fetch supergraph SDL from '${upLink}'`
|
|
1547
1548
|
);
|
|
1548
1549
|
}
|
|
1549
1550
|
if (!result.data?.routerConfig) {
|
|
1550
1551
|
throw new Error(
|
|
1551
|
-
`Failed to fetch supergraph SDL from
|
|
1552
|
+
`Failed to fetch supergraph SDL from '${upLink}': ${responseBody}`
|
|
1552
1553
|
);
|
|
1553
1554
|
}
|
|
1554
1555
|
const { routerConfig } = result.data;
|
package/package.json
CHANGED