@graphql-mesh/merger-stitching 1.0.0-alpha-20230523155104-df277a22b → 1.0.0-alpha-20230523160518-5443a1139

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/index.js CHANGED
@@ -35,16 +35,17 @@ class StitchingMerger {
35
35
  let newSchema = await this.store
36
36
  .proxy(`${name}_stitching`, store_1.PredefinedProxyOptions.GraphQLSchemaWithDiffing)
37
37
  .getWithSet(async () => {
38
+ var _a, _b, _c;
38
39
  this.logger.debug(`Fetching Apollo Federated Service SDL for ${name}`);
39
40
  let federationSdl;
40
- if (oldSchema.extensions?.directives?.link) {
41
+ if ((_b = (_a = oldSchema.extensions) === null || _a === void 0 ? void 0 : _a.directives) === null || _b === void 0 ? void 0 : _b.link) {
41
42
  federationSdl = (0, utils_2.printSchemaWithDirectives)(oldSchema);
42
43
  }
43
44
  else {
44
45
  const sdlQueryResult = (await executor({
45
46
  document: (0, graphql_1.parse)(APOLLO_GET_SERVICE_DEFINITION_QUERY),
46
47
  }));
47
- if (sdlQueryResult.errors?.length) {
48
+ if ((_c = sdlQueryResult.errors) === null || _c === void 0 ? void 0 : _c.length) {
48
49
  throw new utils_2.AggregateError(sdlQueryResult.errors, `Failed on fetching Federated SDL for ${name}`);
49
50
  }
50
51
  federationSdl = sdlQueryResult.data._service.sdl;
package/esm/index.js CHANGED
@@ -33,16 +33,17 @@ export default class StitchingMerger {
33
33
  let newSchema = await this.store
34
34
  .proxy(`${name}_stitching`, PredefinedProxyOptions.GraphQLSchemaWithDiffing)
35
35
  .getWithSet(async () => {
36
+ var _a, _b, _c;
36
37
  this.logger.debug(`Fetching Apollo Federated Service SDL for ${name}`);
37
38
  let federationSdl;
38
- if (oldSchema.extensions?.directives?.link) {
39
+ if ((_b = (_a = oldSchema.extensions) === null || _a === void 0 ? void 0 : _a.directives) === null || _b === void 0 ? void 0 : _b.link) {
39
40
  federationSdl = printSchemaWithDirectives(oldSchema);
40
41
  }
41
42
  else {
42
43
  const sdlQueryResult = (await executor({
43
44
  document: parse(APOLLO_GET_SERVICE_DEFINITION_QUERY),
44
45
  }));
45
- if (sdlQueryResult.errors?.length) {
46
+ if ((_c = sdlQueryResult.errors) === null || _c === void 0 ? void 0 : _c.length) {
46
47
  throw new AggregateError(sdlQueryResult.errors, `Failed on fetching Federated SDL for ${name}`);
47
48
  }
48
49
  federationSdl = sdlQueryResult.data._service.sdl;
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@graphql-mesh/merger-stitching",
3
- "version": "1.0.0-alpha-20230523155104-df277a22b",
3
+ "version": "1.0.0-alpha-20230523160518-5443a1139",
4
4
  "sideEffects": false,
5
5
  "peerDependencies": {
6
- "@graphql-mesh/store": "1.0.0-alpha-20230523155104-df277a22b",
7
- "@graphql-mesh/types": "1.0.0-alpha-20230523155104-df277a22b",
8
- "@graphql-mesh/utils": "1.0.0-alpha-20230523155104-df277a22b",
6
+ "@graphql-mesh/store": "1.0.0-alpha-20230523160518-5443a1139",
7
+ "@graphql-mesh/types": "1.0.0-alpha-20230523160518-5443a1139",
8
+ "@graphql-mesh/utils": "1.0.0-alpha-20230523160518-5443a1139",
9
9
  "@graphql-tools/utils": "^9.2.1",
10
10
  "graphql": "*",
11
11
  "tslib": "^2.4.0"
@@ -22,9 +22,6 @@
22
22
  "directory": "packages/mergers/stitching"
23
23
  },
24
24
  "license": "MIT",
25
- "engines": {
26
- "node": ">=16.0.0"
27
- },
28
25
  "main": "cjs/index.js",
29
26
  "module": "esm/index.js",
30
27
  "typings": "typings/index.d.ts",