@graphql-mesh/merger-bare 0.15.0-alpha-8832b647f.0 → 0.15.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.
Files changed (3) hide show
  1. package/index.js +3 -1
  2. package/index.mjs +5 -3
  3. package/package.json +3 -3
package/index.js CHANGED
@@ -31,7 +31,9 @@ class BareMerger {
31
31
  return {
32
32
  get() {
33
33
  // We should return a version of the schema only with the source-level transforms
34
- return utils.applySchemaTransforms(schema$1, rawSource, schema$1, rawSource.transforms);
34
+ // But we should prevent the existing schema from being mutated internally
35
+ const nonExecutableSchema = graphql.buildASTSchema(utils$1.getDocumentNodeFromSchema(schema$1));
36
+ return utils.applySchemaTransforms(nonExecutableSchema, rawSource, nonExecutableSchema, rawSource.transforms);
35
37
  },
36
38
  };
37
39
  },
package/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { applySchemaTransforms } from '@graphql-mesh/utils';
2
2
  import { addResolversToSchema, mergeSchemas } from '@graphql-tools/schema';
3
- import { asArray } from '@graphql-tools/utils';
4
- import { extendSchema } from 'graphql';
3
+ import { asArray, getDocumentNodeFromSchema } from '@graphql-tools/utils';
4
+ import { extendSchema, buildASTSchema } from 'graphql';
5
5
 
6
6
  class BareMerger {
7
7
  constructor(options) {
@@ -29,7 +29,9 @@ class BareMerger {
29
29
  return {
30
30
  get() {
31
31
  // We should return a version of the schema only with the source-level transforms
32
- return applySchemaTransforms(schema, rawSource, schema, rawSource.transforms);
32
+ // But we should prevent the existing schema from being mutated internally
33
+ const nonExecutableSchema = buildASTSchema(getDocumentNodeFromSchema(schema));
34
+ return applySchemaTransforms(nonExecutableSchema, rawSource, nonExecutableSchema, rawSource.transforms);
33
35
  },
34
36
  };
35
37
  },
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@graphql-mesh/merger-bare",
3
- "version": "0.15.0-alpha-8832b647f.0",
3
+ "version": "0.15.0",
4
4
  "sideEffects": false,
5
5
  "peerDependencies": {
6
6
  "graphql": "*"
7
7
  },
8
8
  "dependencies": {
9
- "@graphql-mesh/types": "0.78.0-alpha-8832b647f.0",
10
- "@graphql-mesh/utils": "0.37.1-alpha-8832b647f.0",
9
+ "@graphql-mesh/types": "0.78.0",
10
+ "@graphql-mesh/utils": "0.37.1",
11
11
  "@graphql-tools/schema": "8.5.0",
12
12
  "@graphql-tools/utils": "8.8.0",
13
13
  "tslib": "^2.4.0"