@graphql-mesh/fusion-composition 0.7.18-alpha-20250120193117-c5311d507645783d8618c8de8c5167777be753d7 → 0.7.18-alpha-20250121010420-ca4d2092383ebce3108fea2d720cf912768168d9

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.
@@ -85,19 +85,6 @@ const FEDERATION_V1_DIRECTIVES = [
85
85
  ];
86
86
  function detectAndAddMeshDirectives(subgraph) {
87
87
  const meshDirectives = [];
88
- const existingAdditionalDirectives = [];
89
- const existingDirectiveExtensionsOnSchema = (0, utils_1.getDirectiveExtensions)(subgraph);
90
- if (existingDirectiveExtensionsOnSchema?.link) {
91
- const linkDirectives = existingDirectiveExtensionsOnSchema.link;
92
- for (const linkDirective of linkDirectives) {
93
- if (linkDirective.url != null &&
94
- !linkDirective.url.startsWith('https://the-guild.dev/graphql/mesh/spec/')) {
95
- if (linkDirective.import) {
96
- existingAdditionalDirectives.push(...linkDirective.import);
97
- }
98
- }
99
- }
100
- }
101
88
  subgraph = (0, utils_1.mapSchema)(subgraph, {
102
89
  [utils_1.MapperKind.DIRECTIVE]: directive => {
103
90
  const directiveName = `@${directive.name}`;
@@ -105,8 +92,7 @@ function detectAndAddMeshDirectives(subgraph) {
105
92
  !FEDERATION_V1_DIRECTIVES.includes(directiveName) &&
106
93
  !directiveName.startsWith('@federation__') &&
107
94
  directiveName !== '@stream' &&
108
- directiveName !== '@link' &&
109
- !existingAdditionalDirectives.includes(directiveName)) {
95
+ directiveName !== '@link') {
110
96
  meshDirectives.push(directiveName);
111
97
  if (!directive.isRepeatable && directive.args.some(arg => arg.name === 'subgraph')) {
112
98
  return new graphql_1.GraphQLDirective({
@@ -77,19 +77,6 @@ const FEDERATION_V1_DIRECTIVES = [
77
77
  ];
78
78
  export function detectAndAddMeshDirectives(subgraph) {
79
79
  const meshDirectives = [];
80
- const existingAdditionalDirectives = [];
81
- const existingDirectiveExtensionsOnSchema = getDirectiveExtensions(subgraph);
82
- if (existingDirectiveExtensionsOnSchema?.link) {
83
- const linkDirectives = existingDirectiveExtensionsOnSchema.link;
84
- for (const linkDirective of linkDirectives) {
85
- if (linkDirective.url != null &&
86
- !linkDirective.url.startsWith('https://the-guild.dev/graphql/mesh/spec/')) {
87
- if (linkDirective.import) {
88
- existingAdditionalDirectives.push(...linkDirective.import);
89
- }
90
- }
91
- }
92
- }
93
80
  subgraph = mapSchema(subgraph, {
94
81
  [MapperKind.DIRECTIVE]: directive => {
95
82
  const directiveName = `@${directive.name}`;
@@ -97,8 +84,7 @@ export function detectAndAddMeshDirectives(subgraph) {
97
84
  !FEDERATION_V1_DIRECTIVES.includes(directiveName) &&
98
85
  !directiveName.startsWith('@federation__') &&
99
86
  directiveName !== '@stream' &&
100
- directiveName !== '@link' &&
101
- !existingAdditionalDirectives.includes(directiveName)) {
87
+ directiveName !== '@link') {
102
88
  meshDirectives.push(directiveName);
103
89
  if (!directive.isRepeatable && directive.args.some(arg => arg.name === 'subgraph')) {
104
90
  return new GraphQLDirective({
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@graphql-mesh/fusion-composition",
3
- "version": "0.7.18-alpha-20250120193117-c5311d507645783d8618c8de8c5167777be753d7",
3
+ "version": "0.7.18-alpha-20250121010420-ca4d2092383ebce3108fea2d720cf912768168d9",
4
4
  "description": "Basic composition utility for Fusion spec",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {
7
7
  "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
8
8
  },
9
9
  "dependencies": {
10
- "@graphql-mesh/utils": "0.103.12-alpha-20250120193117-c5311d507645783d8618c8de8c5167777be753d7",
10
+ "@graphql-mesh/utils": "0.103.12-alpha-20250121010420-ca4d2092383ebce3108fea2d720cf912768168d9",
11
11
  "@graphql-tools/schema": "^10.0.5",
12
12
  "@graphql-tools/stitching-directives": "^3.1.9",
13
13
  "@graphql-tools/utils": "^10.6.0",