@graphql-mesh/transform-transfer-schema 0.1.2 → 0.1.3-alpha-20230404120213-9e00fe6f4
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 +4 -3
- package/esm/index.js +3 -3
- package/package.json +5 -4
package/cjs/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
3
4
|
const graphql_1 = require("graphql");
|
|
4
|
-
const micromatch_1 = require("micromatch");
|
|
5
|
+
const micromatch_1 = tslib_1.__importDefault(require("micromatch"));
|
|
5
6
|
const utils_1 = require("@graphql-tools/utils");
|
|
6
7
|
class TransferSchemaTransform {
|
|
7
8
|
constructor(options) {
|
|
@@ -38,7 +39,7 @@ class TransferSchemaTransform {
|
|
|
38
39
|
const usePattern = pattern || toField;
|
|
39
40
|
const mapIdentifier = pattern ? 'ArgsConfig' : 'FieldsConfig';
|
|
40
41
|
const mapKey = pattern ? `${toType}.${toField}` : toType;
|
|
41
|
-
const isMatch =
|
|
42
|
+
const isMatch = micromatch_1.default.matcher(usePattern);
|
|
42
43
|
if (isMatch(value)) {
|
|
43
44
|
const currentAdditionalConfigs = this[`additional${mapIdentifier}`].get(mapKey) || {};
|
|
44
45
|
this[`additional${mapIdentifier}`].set(mapKey, {
|
|
@@ -51,7 +52,7 @@ class TransferSchemaTransform {
|
|
|
51
52
|
}
|
|
52
53
|
matchInSet(rulesSet, value) {
|
|
53
54
|
for (const rule of rulesSet) {
|
|
54
|
-
const isMatch =
|
|
55
|
+
const isMatch = micromatch_1.default.matcher(rule);
|
|
55
56
|
if (isMatch(value))
|
|
56
57
|
return true;
|
|
57
58
|
}
|
package/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GraphQLObjectType, } from 'graphql';
|
|
2
|
-
import
|
|
2
|
+
import micromatch from 'micromatch';
|
|
3
3
|
import { MapperKind, mapSchema, pruneSchema } from '@graphql-tools/utils';
|
|
4
4
|
export default class TransferSchemaTransform {
|
|
5
5
|
constructor(options) {
|
|
@@ -36,7 +36,7 @@ export default class TransferSchemaTransform {
|
|
|
36
36
|
const usePattern = pattern || toField;
|
|
37
37
|
const mapIdentifier = pattern ? 'ArgsConfig' : 'FieldsConfig';
|
|
38
38
|
const mapKey = pattern ? `${toType}.${toField}` : toType;
|
|
39
|
-
const isMatch = matcher(usePattern);
|
|
39
|
+
const isMatch = micromatch.matcher(usePattern);
|
|
40
40
|
if (isMatch(value)) {
|
|
41
41
|
const currentAdditionalConfigs = this[`additional${mapIdentifier}`].get(mapKey) || {};
|
|
42
42
|
this[`additional${mapIdentifier}`].set(mapKey, {
|
|
@@ -49,7 +49,7 @@ export default class TransferSchemaTransform {
|
|
|
49
49
|
}
|
|
50
50
|
matchInSet(rulesSet, value) {
|
|
51
51
|
for (const rule of rulesSet) {
|
|
52
|
-
const isMatch = matcher(rule);
|
|
52
|
+
const isMatch = micromatch.matcher(rule);
|
|
53
53
|
if (isMatch(value))
|
|
54
54
|
return true;
|
|
55
55
|
}
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-mesh/transform-transfer-schema",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3-alpha-20230404120213-9e00fe6f4",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@graphql-mesh/types": "
|
|
7
|
-
"@graphql-mesh/utils": "
|
|
6
|
+
"@graphql-mesh/types": "0.91.14-alpha-20230404120213-9e00fe6f4",
|
|
7
|
+
"@graphql-mesh/utils": "0.43.22-alpha-20230404120213-9e00fe6f4",
|
|
8
8
|
"@graphql-tools/utils": "^9.2.1",
|
|
9
9
|
"graphql": "*"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"micromatch": "4.0.
|
|
12
|
+
"micromatch": "4.0.5"
|
|
13
13
|
},
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"main": "cjs/index.js",
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"typescript": {
|
|
19
19
|
"definition": "typings/index.d.ts"
|
|
20
20
|
},
|
|
21
|
+
"type": "module",
|
|
21
22
|
"exports": {
|
|
22
23
|
".": {
|
|
23
24
|
"require": {
|