@graphql-mesh/merger-bare 0.12.10-alpha-707844095.0 → 0.13.0
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/index.js +7 -5
- package/index.mjs +7 -5
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -32,11 +32,13 @@ class BareMerger {
|
|
|
32
32
|
return schema;
|
|
33
33
|
});
|
|
34
34
|
this.logger.debug(() => `Merging sources`);
|
|
35
|
-
let unifiedSchema =
|
|
36
|
-
schemas
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
let unifiedSchema = schemas.length === 1 && !(typeDefs === null || typeDefs === void 0 ? void 0 : typeDefs.length) && !resolvers
|
|
36
|
+
? schemas[0]
|
|
37
|
+
: schema.mergeSchemas({
|
|
38
|
+
schemas,
|
|
39
|
+
typeDefs,
|
|
40
|
+
resolvers,
|
|
41
|
+
});
|
|
40
42
|
this.logger.debug(() => `Handling root level transforms`);
|
|
41
43
|
const rootLevelTransformGroups = utils.groupTransforms(transforms || []);
|
|
42
44
|
if (rootLevelTransformGroups.wrapTransforms.length > 0) {
|
package/index.mjs
CHANGED
|
@@ -30,11 +30,13 @@ class BareMerger {
|
|
|
30
30
|
return schema;
|
|
31
31
|
});
|
|
32
32
|
this.logger.debug(() => `Merging sources`);
|
|
33
|
-
let unifiedSchema =
|
|
34
|
-
schemas
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
let unifiedSchema = schemas.length === 1 && !(typeDefs === null || typeDefs === void 0 ? void 0 : typeDefs.length) && !resolvers
|
|
34
|
+
? schemas[0]
|
|
35
|
+
: mergeSchemas({
|
|
36
|
+
schemas,
|
|
37
|
+
typeDefs,
|
|
38
|
+
resolvers,
|
|
39
|
+
});
|
|
38
40
|
this.logger.debug(() => `Handling root level transforms`);
|
|
39
41
|
const rootLevelTransformGroups = groupTransforms(transforms || []);
|
|
40
42
|
if (rootLevelTransformGroups.wrapTransforms.length > 0) {
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-mesh/merger-bare",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"graphql": "*"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@graphql-mesh/types": "0.57.
|
|
10
|
-
"@graphql-mesh/utils": "0.
|
|
9
|
+
"@graphql-mesh/types": "0.57.2",
|
|
10
|
+
"@graphql-mesh/utils": "0.26.0",
|
|
11
11
|
"@graphql-tools/schema": "8.3.1",
|
|
12
12
|
"@graphql-tools/utils": "8.6.0",
|
|
13
13
|
"@graphql-tools/wrap": "8.3.3",
|