@graphql-mesh/fusion-composition 0.8.11 → 0.8.12-alpha-20250811123610-8aec49c267f74542b51b72d4f16ee9ad6ed7d526
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/cjs/federation-utils.js
CHANGED
|
@@ -18,7 +18,7 @@ function addFederation2DirectivesToSubgraph(subgraph) {
|
|
|
18
18
|
}
|
|
19
19
|
if (!linkDirectives.some(linkDirectiveArgs => linkDirectiveArgs.url?.startsWith('https://specs.apollo.dev/federation/'))) {
|
|
20
20
|
linkDirectives.push({
|
|
21
|
-
url: 'https://specs.apollo.dev/federation/v2.
|
|
21
|
+
url: 'https://specs.apollo.dev/federation/v2.6',
|
|
22
22
|
import: [],
|
|
23
23
|
});
|
|
24
24
|
}
|
|
@@ -38,7 +38,8 @@ function importFederationDirectives(subgraph, directives) {
|
|
|
38
38
|
linkDirectives.push(importStatement);
|
|
39
39
|
}
|
|
40
40
|
// v2.0 is not supported so bump to v2.6
|
|
41
|
-
|
|
41
|
+
const federationVersion = importStatement.url.match(/v(\d+\.\d+)/)?.[1];
|
|
42
|
+
if (federationVersion && federationVersion.startsWith('2.')) {
|
|
42
43
|
importStatement.url = 'https://specs.apollo.dev/federation/v2.6';
|
|
43
44
|
}
|
|
44
45
|
importStatement.import = [...new Set([...(importStatement.import || []), ...directives])];
|
package/esm/federation-utils.js
CHANGED
|
@@ -10,7 +10,7 @@ export function addFederation2DirectivesToSubgraph(subgraph) {
|
|
|
10
10
|
}
|
|
11
11
|
if (!linkDirectives.some(linkDirectiveArgs => linkDirectiveArgs.url?.startsWith('https://specs.apollo.dev/federation/'))) {
|
|
12
12
|
linkDirectives.push({
|
|
13
|
-
url: 'https://specs.apollo.dev/federation/v2.
|
|
13
|
+
url: 'https://specs.apollo.dev/federation/v2.6',
|
|
14
14
|
import: [],
|
|
15
15
|
});
|
|
16
16
|
}
|
|
@@ -30,7 +30,8 @@ export function importFederationDirectives(subgraph, directives) {
|
|
|
30
30
|
linkDirectives.push(importStatement);
|
|
31
31
|
}
|
|
32
32
|
// v2.0 is not supported so bump to v2.6
|
|
33
|
-
|
|
33
|
+
const federationVersion = importStatement.url.match(/v(\d+\.\d+)/)?.[1];
|
|
34
|
+
if (federationVersion && federationVersion.startsWith('2.')) {
|
|
34
35
|
importStatement.url = 'https://specs.apollo.dev/federation/v2.6';
|
|
35
36
|
}
|
|
36
37
|
importStatement.import = [...new Set([...(importStatement.import || []), ...directives])];
|
package/package.json
CHANGED