@graphql-mesh/transform-prefix 0.10.2-alpha-283ce18da.0 → 0.11.1
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 +12 -1
- package/index.mjs +12 -1
- package/package.json +5 -4
package/index.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const wrap = require('@graphql-tools/wrap');
|
|
4
4
|
const utils = require('@graphql-mesh/utils');
|
|
5
|
+
const graphqlScalars = require('graphql-scalars');
|
|
5
6
|
const graphql = require('graphql');
|
|
6
7
|
const utils$1 = require('@graphql-tools/utils');
|
|
7
8
|
|
|
@@ -19,7 +20,17 @@ class WrapPrefix {
|
|
|
19
20
|
if (!prefix) {
|
|
20
21
|
throw new Error(`Transform 'prefix' has missing config: prefix`);
|
|
21
22
|
}
|
|
22
|
-
const ignoreList =
|
|
23
|
+
const ignoreList = [
|
|
24
|
+
...(config.ignore || []),
|
|
25
|
+
'date',
|
|
26
|
+
'hostname',
|
|
27
|
+
'regex',
|
|
28
|
+
'json-pointer',
|
|
29
|
+
'relative-json-pointer',
|
|
30
|
+
'uri-reference',
|
|
31
|
+
'uri-template',
|
|
32
|
+
...Object.keys(graphqlScalars.resolvers),
|
|
33
|
+
];
|
|
23
34
|
const includeTypes = config.includeTypes !== false;
|
|
24
35
|
if (includeTypes) {
|
|
25
36
|
this.transforms.push(new wrap.RenameTypes(typeName => (ignoreList.includes(typeName) ? typeName : `${prefix}${typeName}`)));
|
package/index.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { RenameTypes, RenameRootFields } from '@graphql-tools/wrap';
|
|
2
2
|
import { applySchemaTransforms, applyRequestTransforms, applyResultTransforms } from '@graphql-mesh/utils';
|
|
3
|
+
import { resolvers } from 'graphql-scalars';
|
|
3
4
|
import { isSpecifiedScalarType } from 'graphql';
|
|
4
5
|
import { mapSchema, MapperKind, renameType } from '@graphql-tools/utils';
|
|
5
6
|
|
|
@@ -17,7 +18,17 @@ class WrapPrefix {
|
|
|
17
18
|
if (!prefix) {
|
|
18
19
|
throw new Error(`Transform 'prefix' has missing config: prefix`);
|
|
19
20
|
}
|
|
20
|
-
const ignoreList =
|
|
21
|
+
const ignoreList = [
|
|
22
|
+
...(config.ignore || []),
|
|
23
|
+
'date',
|
|
24
|
+
'hostname',
|
|
25
|
+
'regex',
|
|
26
|
+
'json-pointer',
|
|
27
|
+
'relative-json-pointer',
|
|
28
|
+
'uri-reference',
|
|
29
|
+
'uri-template',
|
|
30
|
+
...Object.keys(resolvers),
|
|
31
|
+
];
|
|
21
32
|
const includeTypes = config.includeTypes !== false;
|
|
22
33
|
if (includeTypes) {
|
|
23
34
|
this.transforms.push(new RenameTypes(typeName => (ignoreList.includes(typeName) ? typeName : `${prefix}${typeName}`)));
|
package/package.json
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-mesh/transform-prefix",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"graphql": "*"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@graphql-mesh/types": "0.
|
|
10
|
-
"@graphql-mesh/utils": "0.26.
|
|
9
|
+
"@graphql-mesh/types": "0.61.0",
|
|
10
|
+
"@graphql-mesh/utils": "0.26.4",
|
|
11
11
|
"@graphql-tools/delegate": "8.4.3",
|
|
12
12
|
"@graphql-tools/utils": "8.6.1",
|
|
13
|
-
"@graphql-tools/wrap": "8.3.3"
|
|
13
|
+
"@graphql-tools/wrap": "8.3.3",
|
|
14
|
+
"graphql-scalars": "1.14.1"
|
|
14
15
|
},
|
|
15
16
|
"license": "MIT",
|
|
16
17
|
"main": "index.js",
|