@graphitation/supermassive 0.8.3 → 0.8.4
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/CHANGELOG.md +10 -2
- package/README.md +24 -29
- package/lib/ast/TypedAST.js +14 -2
- package/lib/ast/addTypesToRequestDocument.js +23 -23
- package/lib/ast/addTypesToRequestDocument.mjs +8 -5
- package/lib/benchmarks/index.js +33 -36
- package/lib/benchmarks/index.mjs +101 -92
- package/lib/benchmarks/nice-benchmark.js +14 -18
- package/lib/benchmarks/nice-benchmark.mjs +2 -3
- package/lib/benchmarks/swapi-schema/index.js +19 -20
- package/lib/benchmarks/swapi-schema/index.mjs +4 -4
- package/lib/benchmarks/swapi-schema/models.js +16 -17
- package/lib/benchmarks/swapi-schema/models.mjs +1 -1
- package/lib/benchmarks/swapi-schema/resolvers.js +65 -66
- package/lib/benchmarks/swapi-schema/resolvers.mjs +51 -48
- package/lib/bin/supermassive.d.ts +1 -0
- package/lib/bin/supermassive.d.ts.map +1 -1
- package/lib/bin/supermassive.js +25 -25
- package/lib/bin/supermassive.mjs +8 -7
- package/lib/collectFields.js +23 -27
- package/lib/collectFields.mjs +10 -10
- package/lib/definition.js +15 -19
- package/lib/definition.mjs +2 -2
- package/lib/directives.js +21 -25
- package/lib/directives.mjs +7 -7
- package/lib/executeWithSchema.js +15 -19
- package/lib/executeWithSchema.mjs +1 -1
- package/lib/executeWithoutSchema.js +37 -41
- package/lib/executeWithoutSchema.mjs +22 -22
- package/lib/extractImplicitTypesRuntime.js +17 -21
- package/lib/extractImplicitTypesRuntime.mjs +3 -3
- package/lib/extractImplicitTypesToTypescript.js +16 -17
- package/lib/extractImplicitTypesToTypescript.mjs +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +24 -26
- package/lib/index.mjs +11 -9
- package/lib/jsutils/Maybe.js +14 -2
- package/lib/jsutils/ObjMap.js +14 -2
- package/lib/jsutils/Path.js +17 -5
- package/lib/jsutils/Path.mjs +1 -1
- package/lib/jsutils/PromiseOrValue.js +14 -2
- package/lib/jsutils/devAssert.js +16 -4
- package/lib/jsutils/didYouMean.js +16 -4
- package/lib/jsutils/identityFunc.js +16 -4
- package/lib/jsutils/inspect.js +16 -4
- package/lib/jsutils/instanceOf.js +14 -18
- package/lib/jsutils/instanceOf.mjs +1 -1
- package/lib/jsutils/invariant.js +16 -4
- package/lib/jsutils/isAsyncIterable.js +16 -4
- package/lib/jsutils/isIterableObject.js +16 -4
- package/lib/jsutils/isObjectLike.js +16 -4
- package/lib/jsutils/isPromise.js +16 -4
- package/lib/jsutils/keyMap.js +17 -5
- package/lib/jsutils/keyMap.mjs +1 -1
- package/lib/jsutils/keyValMap.js +17 -5
- package/lib/jsutils/keyValMap.mjs +1 -1
- package/lib/jsutils/mapValue.js +17 -5
- package/lib/jsutils/mapValue.mjs +1 -1
- package/lib/jsutils/memoize3.js +19 -7
- package/lib/jsutils/memoize3.mjs +3 -3
- package/lib/jsutils/naturalCompare.js +16 -4
- package/lib/jsutils/printPathArray.js +16 -4
- package/lib/jsutils/promiseForObject.js +17 -5
- package/lib/jsutils/promiseForObject.mjs +1 -1
- package/lib/jsutils/promiseReduce.js +14 -18
- package/lib/jsutils/promiseReduce.mjs +1 -1
- package/lib/jsutils/suggestionList.js +15 -19
- package/lib/jsutils/suggestionList.mjs +2 -2
- package/lib/jsutils/toObjMap.js +17 -5
- package/lib/jsutils/toObjMap.mjs +1 -1
- package/lib/subscribeWithSchema.js +15 -19
- package/lib/subscribeWithSchema.mjs +1 -1
- package/lib/subscribeWithoutSchema.js +26 -30
- package/lib/subscribeWithoutSchema.mjs +11 -11
- package/lib/transforms/annotateDocumentGraphQLTransform.js +15 -19
- package/lib/transforms/annotateDocumentGraphQLTransform.mjs +1 -1
- package/lib/transforms/transformerTestUtils.js +24 -25
- package/lib/transforms/transformerTestUtils.mjs +12 -16
- package/lib/types.js +14 -2
- package/lib/utilities/mapAsyncIterator.js +18 -6
- package/lib/utilities/mapAsyncIterator.mjs +2 -2
- package/lib/utilities/mergeResolvers.js +20 -9
- package/lib/utilities/mergeResolvers.mjs +5 -5
- package/lib/utilities/typeNameFromAST.js +14 -18
- package/lib/utilities/typeNameFromAST.mjs +1 -1
- package/lib/values.js +19 -23
- package/lib/values.mjs +5 -5
- package/package.json +1 -1
- package/.eslintcache +0 -1
- package/lib/benchmarks/swapi-schema/__generated__/schema.d.ts +0 -3
- package/lib/benchmarks/swapi-schema/__generated__/schema.d.ts.map +0 -1
- package/lib/benchmarks/swapi-schema/__generated__/schema.js +0 -41
- package/lib/benchmarks/swapi-schema/__generated__/schema.mjs +0 -19
|
@@ -8,19 +8,19 @@ import {
|
|
|
8
8
|
Kind,
|
|
9
9
|
locatedError
|
|
10
10
|
} from "graphql";
|
|
11
|
-
import {collectFields} from "./collectFields.mjs";
|
|
12
|
-
import {devAssert} from "./jsutils/devAssert.mjs";
|
|
13
|
-
import {inspect} from "./jsutils/inspect.mjs";
|
|
14
|
-
import {invariant} from "./jsutils/invariant.mjs";
|
|
15
|
-
import {isIterableObject} from "./jsutils/isIterableObject.mjs";
|
|
16
|
-
import {isObjectLike} from "./jsutils/isObjectLike.mjs";
|
|
17
|
-
import {isPromise} from "./jsutils/isPromise.mjs";
|
|
18
|
-
import {addPath, pathToArray} from "./jsutils/Path.mjs";
|
|
19
|
-
import {promiseForObject} from "./jsutils/promiseForObject.mjs";
|
|
20
|
-
import {promiseReduce} from "./jsutils/promiseReduce.mjs";
|
|
21
|
-
import {isUnionResolverType, isInterfaceResolverType} from "./definition.mjs";
|
|
22
|
-
import {mergeResolvers} from "./utilities/mergeResolvers.mjs";
|
|
23
|
-
import {typeNameFromAST} from "./utilities/typeNameFromAST.mjs";
|
|
11
|
+
import { collectFields } from "./collectFields.mjs";
|
|
12
|
+
import { devAssert } from "./jsutils/devAssert.mjs";
|
|
13
|
+
import { inspect } from "./jsutils/inspect.mjs";
|
|
14
|
+
import { invariant } from "./jsutils/invariant.mjs";
|
|
15
|
+
import { isIterableObject } from "./jsutils/isIterableObject.mjs";
|
|
16
|
+
import { isObjectLike } from "./jsutils/isObjectLike.mjs";
|
|
17
|
+
import { isPromise } from "./jsutils/isPromise.mjs";
|
|
18
|
+
import { addPath, pathToArray } from "./jsutils/Path.mjs";
|
|
19
|
+
import { promiseForObject } from "./jsutils/promiseForObject.mjs";
|
|
20
|
+
import { promiseReduce } from "./jsutils/promiseReduce.mjs";
|
|
21
|
+
import { isUnionResolverType, isInterfaceResolverType } from "./definition.mjs";
|
|
22
|
+
import { mergeResolvers } from "./utilities/mergeResolvers.mjs";
|
|
23
|
+
import { typeNameFromAST } from "./utilities/typeNameFromAST.mjs";
|
|
24
24
|
import {
|
|
25
25
|
getArgumentValues,
|
|
26
26
|
getVariableValues,
|
|
@@ -42,7 +42,7 @@ function executeWithoutSchema(args) {
|
|
|
42
42
|
assertValidExecutionArguments(document, variableValues);
|
|
43
43
|
const exeContext = buildExecutionContext(combinedResolvers, document, rootValue, contextValue, variableValues, operationName, fieldResolver, typeResolver);
|
|
44
44
|
if (!("resolvers" in exeContext)) {
|
|
45
|
-
return {errors: exeContext};
|
|
45
|
+
return { errors: exeContext };
|
|
46
46
|
} else {
|
|
47
47
|
const data = executeOperation(exeContext, exeContext.operation, rootValue);
|
|
48
48
|
return buildResponse(exeContext, data);
|
|
@@ -52,7 +52,7 @@ function buildResponse(exeContext, data) {
|
|
|
52
52
|
if (isPromise(data)) {
|
|
53
53
|
return data.then((resolved) => buildResponse(exeContext, resolved));
|
|
54
54
|
}
|
|
55
|
-
return exeContext.errors.length === 0 ? {data} : {errors: exeContext.errors, data};
|
|
55
|
+
return exeContext.errors.length === 0 ? { data } : { errors: exeContext.errors, data };
|
|
56
56
|
}
|
|
57
57
|
function assertValidExecutionArguments(document, rawVariableValues) {
|
|
58
58
|
devAssert(document, "Must provide document.");
|
|
@@ -61,7 +61,7 @@ function assertValidExecutionArguments(document, rawVariableValues) {
|
|
|
61
61
|
function buildExecutionContext(resolvers, document, rootValue, contextValue, rawVariableValues, operationName, fieldResolver, typeResolver) {
|
|
62
62
|
var _a, _b;
|
|
63
63
|
let operation;
|
|
64
|
-
const fragments = Object.create(null);
|
|
64
|
+
const fragments = /* @__PURE__ */ Object.create(null);
|
|
65
65
|
for (const definition of document.definitions) {
|
|
66
66
|
switch (definition.kind) {
|
|
67
67
|
case Kind.OPERATION_DEFINITION:
|
|
@@ -88,7 +88,7 @@ function buildExecutionContext(resolvers, document, rootValue, contextValue, raw
|
|
|
88
88
|
return [new GraphQLError("Must provide an operation.")];
|
|
89
89
|
}
|
|
90
90
|
const variableDefinitions = (_b = operation.variableDefinitions) != null ? _b : [];
|
|
91
|
-
const coercedVariableValues = getVariableValues(resolvers, variableDefinitions, rawVariableValues != null ? rawVariableValues : {}, {maxErrors: 50});
|
|
91
|
+
const coercedVariableValues = getVariableValues(resolvers, variableDefinitions, rawVariableValues != null ? rawVariableValues : {}, { maxErrors: 50 });
|
|
92
92
|
if (coercedVariableValues.errors) {
|
|
93
93
|
return coercedVariableValues.errors;
|
|
94
94
|
}
|
|
@@ -106,7 +106,7 @@ function buildExecutionContext(resolvers, document, rootValue, contextValue, raw
|
|
|
106
106
|
}
|
|
107
107
|
function executeOperation(exeContext, operation, rootValue) {
|
|
108
108
|
const typeName = getOperationRootTypeName(operation);
|
|
109
|
-
const fields = collectFields(exeContext.resolvers, exeContext.fragments, exeContext.variableValues, typeName, operation.selectionSet, new Map(), new Set());
|
|
109
|
+
const fields = collectFields(exeContext.resolvers, exeContext.fragments, exeContext.variableValues, typeName, operation.selectionSet, /* @__PURE__ */ new Map(), /* @__PURE__ */ new Set());
|
|
110
110
|
const path = void 0;
|
|
111
111
|
try {
|
|
112
112
|
const result = operation.operation === "mutation" ? executeFieldsSerially(exeContext, typeName, rootValue, path, fields) : executeFields(exeContext, typeName, rootValue, path, fields);
|
|
@@ -137,10 +137,10 @@ function executeFieldsSerially(exeContext, parentTypeName, sourceValue, path, fi
|
|
|
137
137
|
}
|
|
138
138
|
results[responseName] = result;
|
|
139
139
|
return results;
|
|
140
|
-
}, Object.create(null));
|
|
140
|
+
}, /* @__PURE__ */ Object.create(null));
|
|
141
141
|
}
|
|
142
142
|
function executeFields(exeContext, parentTypeName, sourceValue, path, fields) {
|
|
143
|
-
const results = Object.create(null);
|
|
143
|
+
const results = /* @__PURE__ */ Object.create(null);
|
|
144
144
|
let containsPromise = false;
|
|
145
145
|
for (const [responseName, fieldNodes] of fields.entries()) {
|
|
146
146
|
const fieldPath = addPath(path, responseName, parentTypeName);
|
|
@@ -342,8 +342,8 @@ function completeObjectValue(exeContext, returnTypeName, fieldNodes, info, path,
|
|
|
342
342
|
return executeFields(exeContext, returnTypeName, result, path, subFieldNodes);
|
|
343
343
|
}
|
|
344
344
|
function collectSubfields(exeContext, returnTypeName, fieldNodes) {
|
|
345
|
-
let subFieldNodes = new Map();
|
|
346
|
-
const visitedFragmentNames = new Set();
|
|
345
|
+
let subFieldNodes = /* @__PURE__ */ new Map();
|
|
346
|
+
const visitedFragmentNames = /* @__PURE__ */ new Set();
|
|
347
347
|
for (const node of fieldNodes) {
|
|
348
348
|
if (node.selectionSet) {
|
|
349
349
|
subFieldNodes = collectFields(exeContext.resolvers, exeContext.fragments, exeContext.variableValues, returnTypeName, node.selectionSet, subFieldNodes, visitedFragmentNames);
|
|
@@ -1,33 +1,29 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
1
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
-
var
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
5
|
var __export = (target, all) => {
|
|
9
6
|
for (var name in all)
|
|
10
|
-
__defProp(target, name, {get: all[name], enumerable: true});
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
8
|
};
|
|
12
|
-
var
|
|
13
|
-
if (
|
|
14
|
-
for (let key of __getOwnPropNames(
|
|
15
|
-
if (!__hasOwnProp.call(
|
|
16
|
-
__defProp(
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
14
|
}
|
|
18
|
-
return
|
|
19
|
-
};
|
|
20
|
-
var __toModule = (module2) => {
|
|
21
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? {get: () => module2.default, enumerable: true} : {value: module2, enumerable: true})), module2);
|
|
15
|
+
return to;
|
|
22
16
|
};
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var extractImplicitTypesRuntime_exports = {};
|
|
19
|
+
__export(extractImplicitTypesRuntime_exports, {
|
|
25
20
|
extractImplicitTypes: () => extractImplicitTypes
|
|
26
21
|
});
|
|
27
|
-
|
|
22
|
+
module.exports = __toCommonJS(extractImplicitTypesRuntime_exports);
|
|
23
|
+
var import_graphql = require("graphql");
|
|
28
24
|
function extractImplicitTypes(document, getTypeByName) {
|
|
29
25
|
var _a, _b, _c;
|
|
30
|
-
const result = Object.create(null);
|
|
26
|
+
const result = /* @__PURE__ */ Object.create(null);
|
|
31
27
|
const implementedBy = {};
|
|
32
28
|
for (let astNode of document.definitions) {
|
|
33
29
|
if (astNode.kind === import_graphql.Kind.SCALAR_TYPE_DEFINITION) {
|
|
@@ -70,7 +66,7 @@ function extractImplicitTypes(document, getTypeByName) {
|
|
|
70
66
|
}
|
|
71
67
|
function makeEnum(astNode) {
|
|
72
68
|
var _a, _b;
|
|
73
|
-
const enumValueMap = Object.create(null);
|
|
69
|
+
const enumValueMap = /* @__PURE__ */ Object.create(null);
|
|
74
70
|
for (const value of astNode.values || []) {
|
|
75
71
|
enumValueMap[value.name.value] = {
|
|
76
72
|
description: (_a = value.description) == null ? void 0 : _a.value,
|
|
@@ -96,7 +92,7 @@ function makeInputObject(astNode, getTypeByName) {
|
|
|
96
92
|
}
|
|
97
93
|
function buildInputFieldMap(fieldNodes, getTypeByName) {
|
|
98
94
|
var _a;
|
|
99
|
-
const inputFieldMap = Object.create(null);
|
|
95
|
+
const inputFieldMap = /* @__PURE__ */ Object.create(null);
|
|
100
96
|
for (const field of fieldNodes) {
|
|
101
97
|
const type = getWrappedType(field.type, getTypeByName);
|
|
102
98
|
inputFieldMap[field.name.value] = {
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from "graphql";
|
|
13
13
|
function extractImplicitTypes(document, getTypeByName) {
|
|
14
14
|
var _a, _b, _c;
|
|
15
|
-
const result = Object.create(null);
|
|
15
|
+
const result = /* @__PURE__ */ Object.create(null);
|
|
16
16
|
const implementedBy = {};
|
|
17
17
|
for (let astNode of document.definitions) {
|
|
18
18
|
if (astNode.kind === Kind.SCALAR_TYPE_DEFINITION) {
|
|
@@ -55,7 +55,7 @@ function extractImplicitTypes(document, getTypeByName) {
|
|
|
55
55
|
}
|
|
56
56
|
function makeEnum(astNode) {
|
|
57
57
|
var _a, _b;
|
|
58
|
-
const enumValueMap = Object.create(null);
|
|
58
|
+
const enumValueMap = /* @__PURE__ */ Object.create(null);
|
|
59
59
|
for (const value of astNode.values || []) {
|
|
60
60
|
enumValueMap[value.name.value] = {
|
|
61
61
|
description: (_a = value.description) == null ? void 0 : _a.value,
|
|
@@ -81,7 +81,7 @@ function makeInputObject(astNode, getTypeByName) {
|
|
|
81
81
|
}
|
|
82
82
|
function buildInputFieldMap(fieldNodes, getTypeByName) {
|
|
83
83
|
var _a;
|
|
84
|
-
const inputFieldMap = Object.create(null);
|
|
84
|
+
const inputFieldMap = /* @__PURE__ */ Object.create(null);
|
|
85
85
|
for (const field of fieldNodes) {
|
|
86
86
|
const type = getWrappedType(field.type, getTypeByName);
|
|
87
87
|
inputFieldMap[field.name.value] = {
|
|
@@ -1,31 +1,30 @@
|
|
|
1
1
|
var __create = Object.create;
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
4
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", {value: true});
|
|
8
7
|
var __export = (target, all) => {
|
|
9
8
|
for (var name in all)
|
|
10
|
-
__defProp(target, name, {get: all[name], enumerable: true});
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
10
|
};
|
|
12
|
-
var
|
|
13
|
-
if (
|
|
14
|
-
for (let key of __getOwnPropNames(
|
|
15
|
-
if (!__hasOwnProp.call(
|
|
16
|
-
__defProp(
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
16
|
}
|
|
18
|
-
return
|
|
19
|
-
};
|
|
20
|
-
var __toModule = (module2) => {
|
|
21
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? {get: () => module2.default, enumerable: true} : {value: module2, enumerable: true})), module2);
|
|
17
|
+
return to;
|
|
22
18
|
};
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
var extractImplicitTypesToTypescript_exports = {};
|
|
22
|
+
__export(extractImplicitTypesToTypescript_exports, {
|
|
25
23
|
extractImplicitTypesToTypescript: () => extractImplicitTypesToTypescript
|
|
26
24
|
});
|
|
27
|
-
|
|
28
|
-
var
|
|
25
|
+
module.exports = __toCommonJS(extractImplicitTypesToTypescript_exports);
|
|
26
|
+
var import_typescript = __toESM(require("typescript"));
|
|
27
|
+
var import_graphql = require("graphql");
|
|
29
28
|
const SPECIFIED_SCALARS = {
|
|
30
29
|
ID: "GraphQLID",
|
|
31
30
|
String: "GraphQLString",
|
package/lib/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export { executeWithoutSchema } from "./executeWithoutSchema";
|
|
|
2
2
|
export { executeWithSchema } from "./executeWithSchema";
|
|
3
3
|
export { subscribeWithSchema } from "./subscribeWithSchema";
|
|
4
4
|
export { subscribeWithoutSchema } from "./subscribeWithoutSchema";
|
|
5
|
+
export { typeDefsToImplicitResolversImpl } from "./bin/supermassive";
|
|
5
6
|
export type { ObjectTypeResolver, InterfaceTypeResolver, UnionTypeResolver, ScalarTypeResolver, EnumTypeResolver, InputObjectTypeResolver, FunctionFieldResolver, Resolvers, } from "./types";
|
|
6
7
|
export { addTypesToRequestDocument } from "./ast/addTypesToRequestDocument";
|
|
7
8
|
export { extractImplicitTypes } from "./extractImplicitTypesRuntime";
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAC;AAErE,YAAY,EACV,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,EACvB,qBAAqB,EACrB,SAAS,GACV,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAE5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,OAAO,EAAE,gCAAgC,EAAE,MAAM,+CAA+C,CAAC;AAEjG,YAAY,EACV,QAAQ,EACR,YAAY,EACZ,uBAAuB,EACvB,sBAAsB,EACtB,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,YAAY,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,EACtB,YAAY,EACZ,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,aAAa,EACb,eAAe,EACf,eAAe,EACf,aAAa,EACb,aAAa,EACb,YAAY,EACZ,eAAe,EACf,oBAAoB,EACpB,2BAA2B,EAC3B,wBAAwB,EACxB,wBAAwB,EACxB,mBAAmB,EACnB,wBAAwB,EACxB,2BAA2B,EAC3B,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,6BAA6B,EAC7B,uBAAuB,EACvB,mBAAmB,EACnB,uBAAuB,EACvB,uBAAuB,EACvB,0BAA0B,EAC1B,sBAAsB,EACtB,qBAAqB,EACrB,4BAA4B,GAC7B,MAAM,gBAAgB,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -1,27 +1,22 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
1
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
-
var
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
5
|
var __export = (target, all) => {
|
|
9
6
|
for (var name in all)
|
|
10
|
-
__defProp(target, name, {get: all[name], enumerable: true});
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
8
|
};
|
|
12
|
-
var
|
|
13
|
-
if (
|
|
14
|
-
for (let key of __getOwnPropNames(
|
|
15
|
-
if (!__hasOwnProp.call(
|
|
16
|
-
__defProp(
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
14
|
}
|
|
18
|
-
return
|
|
19
|
-
};
|
|
20
|
-
var __toModule = (module2) => {
|
|
21
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? {get: () => module2.default, enumerable: true} : {value: module2, enumerable: true})), module2);
|
|
15
|
+
return to;
|
|
22
16
|
};
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var src_exports = {};
|
|
19
|
+
__export(src_exports, {
|
|
25
20
|
addTypesToRequestDocument: () => import_addTypesToRequestDocument.addTypesToRequestDocument,
|
|
26
21
|
annotateDocumentGraphQLTransform: () => import_annotateDocumentGraphQLTransform.annotateDocumentGraphQLTransform,
|
|
27
22
|
executeWithSchema: () => import_executeWithSchema.executeWithSchema,
|
|
@@ -29,13 +24,16 @@ __export(exports, {
|
|
|
29
24
|
extractImplicitTypes: () => import_extractImplicitTypesRuntime.extractImplicitTypes,
|
|
30
25
|
specifiedScalars: () => import_values.specifiedScalars,
|
|
31
26
|
subscribeWithSchema: () => import_subscribeWithSchema.subscribeWithSchema,
|
|
32
|
-
subscribeWithoutSchema: () => import_subscribeWithoutSchema.subscribeWithoutSchema
|
|
27
|
+
subscribeWithoutSchema: () => import_subscribeWithoutSchema.subscribeWithoutSchema,
|
|
28
|
+
typeDefsToImplicitResolversImpl: () => import_supermassive.typeDefsToImplicitResolversImpl
|
|
33
29
|
});
|
|
34
|
-
|
|
35
|
-
var
|
|
36
|
-
var
|
|
37
|
-
var
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
var
|
|
30
|
+
module.exports = __toCommonJS(src_exports);
|
|
31
|
+
var import_executeWithoutSchema = require("./executeWithoutSchema");
|
|
32
|
+
var import_executeWithSchema = require("./executeWithSchema");
|
|
33
|
+
var import_subscribeWithSchema = require("./subscribeWithSchema");
|
|
34
|
+
var import_subscribeWithoutSchema = require("./subscribeWithoutSchema");
|
|
35
|
+
var import_supermassive = require("./bin/supermassive");
|
|
36
|
+
var import_addTypesToRequestDocument = require("./ast/addTypesToRequestDocument");
|
|
37
|
+
var import_extractImplicitTypesRuntime = require("./extractImplicitTypesRuntime");
|
|
38
|
+
var import_values = require("./values");
|
|
39
|
+
var import_annotateDocumentGraphQLTransform = require("./transforms/annotateDocumentGraphQLTransform");
|
package/lib/index.mjs
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
|
-
import {executeWithoutSchema} from "./executeWithoutSchema.mjs";
|
|
3
|
-
import {executeWithSchema} from "./executeWithSchema.mjs";
|
|
4
|
-
import {subscribeWithSchema} from "./subscribeWithSchema.mjs";
|
|
5
|
-
import {subscribeWithoutSchema} from "./subscribeWithoutSchema.mjs";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
2
|
+
import { executeWithoutSchema } from "./executeWithoutSchema.mjs";
|
|
3
|
+
import { executeWithSchema } from "./executeWithSchema.mjs";
|
|
4
|
+
import { subscribeWithSchema } from "./subscribeWithSchema.mjs";
|
|
5
|
+
import { subscribeWithoutSchema } from "./subscribeWithoutSchema.mjs";
|
|
6
|
+
import { typeDefsToImplicitResolversImpl } from "./bin/supermassive.mjs";
|
|
7
|
+
import { addTypesToRequestDocument } from "./ast/addTypesToRequestDocument.mjs";
|
|
8
|
+
import { extractImplicitTypes } from "./extractImplicitTypesRuntime.mjs";
|
|
9
|
+
import { specifiedScalars } from "./values.mjs";
|
|
10
|
+
import { annotateDocumentGraphQLTransform } from "./transforms/annotateDocumentGraphQLTransform.mjs";
|
|
10
11
|
export {
|
|
11
12
|
addTypesToRequestDocument,
|
|
12
13
|
annotateDocumentGraphQLTransform,
|
|
@@ -15,5 +16,6 @@ export {
|
|
|
15
16
|
extractImplicitTypes,
|
|
16
17
|
specifiedScalars,
|
|
17
18
|
subscribeWithSchema,
|
|
18
|
-
subscribeWithoutSchema
|
|
19
|
+
subscribeWithoutSchema,
|
|
20
|
+
typeDefsToImplicitResolversImpl
|
|
19
21
|
};
|
package/lib/jsutils/Maybe.js
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var Maybe_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(Maybe_exports);
|
package/lib/jsutils/ObjMap.js
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var ObjMap_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(ObjMap_exports);
|
package/lib/jsutils/Path.js
CHANGED
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
-
var
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
3
5
|
var __export = (target, all) => {
|
|
4
6
|
for (var name in all)
|
|
5
|
-
__defProp(target, name, {get: all[name], enumerable: true});
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
6
8
|
};
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var Path_exports = {};
|
|
19
|
+
__export(Path_exports, {
|
|
9
20
|
addPath: () => addPath,
|
|
10
21
|
pathToArray: () => pathToArray
|
|
11
22
|
});
|
|
23
|
+
module.exports = __toCommonJS(Path_exports);
|
|
12
24
|
function addPath(prev, key, typename) {
|
|
13
|
-
return {prev, key, typename};
|
|
25
|
+
return { prev, key, typename };
|
|
14
26
|
}
|
|
15
27
|
function pathToArray(path) {
|
|
16
28
|
const flattened = [];
|
package/lib/jsutils/Path.mjs
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var PromiseOrValue_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(PromiseOrValue_exports);
|
package/lib/jsutils/devAssert.js
CHANGED
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
-
var
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
3
5
|
var __export = (target, all) => {
|
|
4
6
|
for (var name in all)
|
|
5
|
-
__defProp(target, name, {get: all[name], enumerable: true});
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
6
8
|
};
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var devAssert_exports = {};
|
|
19
|
+
__export(devAssert_exports, {
|
|
9
20
|
devAssert: () => devAssert
|
|
10
21
|
});
|
|
22
|
+
module.exports = __toCommonJS(devAssert_exports);
|
|
11
23
|
function devAssert(condition, message) {
|
|
12
24
|
const booleanCondition = Boolean(condition);
|
|
13
25
|
if (!booleanCondition) {
|
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
-
var
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
3
5
|
var __export = (target, all) => {
|
|
4
6
|
for (var name in all)
|
|
5
|
-
__defProp(target, name, {get: all[name], enumerable: true});
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
6
8
|
};
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var didYouMean_exports = {};
|
|
19
|
+
__export(didYouMean_exports, {
|
|
9
20
|
didYouMean: () => didYouMean
|
|
10
21
|
});
|
|
22
|
+
module.exports = __toCommonJS(didYouMean_exports);
|
|
11
23
|
const MAX_SUGGESTIONS = 5;
|
|
12
24
|
function didYouMean(firstArg, secondArg) {
|
|
13
25
|
const [subMessage, suggestionsArg] = secondArg ? [firstArg, secondArg] : [void 0, firstArg];
|
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
-
var
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
3
5
|
var __export = (target, all) => {
|
|
4
6
|
for (var name in all)
|
|
5
|
-
__defProp(target, name, {get: all[name], enumerable: true});
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
6
8
|
};
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var identityFunc_exports = {};
|
|
19
|
+
__export(identityFunc_exports, {
|
|
9
20
|
identityFunc: () => identityFunc
|
|
10
21
|
});
|
|
22
|
+
module.exports = __toCommonJS(identityFunc_exports);
|
|
11
23
|
function identityFunc(x) {
|
|
12
24
|
return x;
|
|
13
25
|
}
|
package/lib/jsutils/inspect.js
CHANGED
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
-
var
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
3
5
|
var __export = (target, all) => {
|
|
4
6
|
for (var name in all)
|
|
5
|
-
__defProp(target, name, {get: all[name], enumerable: true});
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
6
8
|
};
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var inspect_exports = {};
|
|
19
|
+
__export(inspect_exports, {
|
|
9
20
|
inspect: () => inspect
|
|
10
21
|
});
|
|
22
|
+
module.exports = __toCommonJS(inspect_exports);
|
|
11
23
|
const MAX_ARRAY_LENGTH = 10;
|
|
12
24
|
const MAX_RECURSIVE_DEPTH = 2;
|
|
13
25
|
function inspect(value) {
|