@envelop/testing 4.5.0 → 4.5.1-alpha-20220824152235-afd061e6
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 +8 -0
- package/esm/index.js +9 -1
- package/package.json +3 -3
package/cjs/index.js
CHANGED
|
@@ -55,12 +55,20 @@ function createTestkit(pluginsOrEnvelop, schema) {
|
|
|
55
55
|
let getEnveloped = Array.isArray(pluginsOrEnvelop)
|
|
56
56
|
? (0, core_1.envelop)({
|
|
57
57
|
plugins: [...(schema ? [(0, core_1.useSchema)((0, utils_1.mapSchema)(schema))] : []), ...pluginsOrEnvelop],
|
|
58
|
+
parse: graphql_1.parse,
|
|
59
|
+
execute: graphql_1.execute,
|
|
60
|
+
validate: graphql_1.validate,
|
|
61
|
+
subscribe: graphql_1.subscribe,
|
|
58
62
|
})
|
|
59
63
|
: pluginsOrEnvelop;
|
|
60
64
|
return {
|
|
61
65
|
modifyPlugins(modifyPluginsFn) {
|
|
62
66
|
getEnveloped = (0, core_1.envelop)({
|
|
63
67
|
plugins: [...(schema ? [(0, core_1.useSchema)((0, utils_1.mapSchema)(schema))] : []), ...modifyPluginsFn(getEnveloped._plugins)],
|
|
68
|
+
parse: graphql_1.parse,
|
|
69
|
+
execute: graphql_1.execute,
|
|
70
|
+
validate: graphql_1.validate,
|
|
71
|
+
subscribe: graphql_1.subscribe,
|
|
64
72
|
});
|
|
65
73
|
},
|
|
66
74
|
mockPhase(phaseReplacement) {
|
package/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getOperationAST, GraphQLError, print } from 'graphql';
|
|
1
|
+
import { getOperationAST, GraphQLError, print, execute, parse, subscribe, validate, } from 'graphql';
|
|
2
2
|
import { useSchema, envelop, isAsyncIterable } from '@envelop/core';
|
|
3
3
|
import { mapSchema as cloneSchema, isDocumentNode } from '@graphql-tools/utils';
|
|
4
4
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
@@ -51,12 +51,20 @@ export function createTestkit(pluginsOrEnvelop, schema) {
|
|
|
51
51
|
let getEnveloped = Array.isArray(pluginsOrEnvelop)
|
|
52
52
|
? envelop({
|
|
53
53
|
plugins: [...(schema ? [useSchema(cloneSchema(schema))] : []), ...pluginsOrEnvelop],
|
|
54
|
+
parse,
|
|
55
|
+
execute,
|
|
56
|
+
validate,
|
|
57
|
+
subscribe,
|
|
54
58
|
})
|
|
55
59
|
: pluginsOrEnvelop;
|
|
56
60
|
return {
|
|
57
61
|
modifyPlugins(modifyPluginsFn) {
|
|
58
62
|
getEnveloped = envelop({
|
|
59
63
|
plugins: [...(schema ? [useSchema(cloneSchema(schema))] : []), ...modifyPluginsFn(getEnveloped._plugins)],
|
|
64
|
+
parse,
|
|
65
|
+
execute,
|
|
66
|
+
validate,
|
|
67
|
+
subscribe,
|
|
60
68
|
});
|
|
61
69
|
},
|
|
62
70
|
mockPhase(phaseReplacement) {
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@envelop/testing",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.1-alpha-20220824152235-afd061e6",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@envelop/core": "
|
|
7
|
-
"@envelop/types": "
|
|
6
|
+
"@envelop/core": "2.5.1-alpha-20220824152235-afd061e6",
|
|
7
|
+
"@envelop/types": "2.3.2-alpha-20220824152235-afd061e6",
|
|
8
8
|
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|