@graphitation/supermassive 2.5.0 → 3.0.0-alpha.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/.eslintcache +1 -1
- package/CHANGELOG.md +18 -2
- package/lib/benchmarks/index.js +2 -2
- package/lib/benchmarks/index.js.map +2 -2
- package/lib/benchmarks/index.mjs +2 -2
- package/lib/benchmarks/index.mjs.map +2 -2
- package/lib/benchmarks/swapi-schema/index.d.ts +4 -2
- package/lib/benchmarks/swapi-schema/index.d.ts.map +1 -1
- package/lib/benchmarks/swapi-schema/index.js +8 -2
- package/lib/benchmarks/swapi-schema/index.js.map +2 -2
- package/lib/benchmarks/swapi-schema/index.mjs +8 -2
- package/lib/benchmarks/swapi-schema/index.mjs.map +2 -2
- package/lib/benchmarks/swapi-schema/makeExecutableSchema.d.ts +7 -0
- package/lib/benchmarks/swapi-schema/makeExecutableSchema.d.ts.map +1 -0
- package/lib/benchmarks/swapi-schema/makeExecutableSchema.js +916 -0
- package/lib/benchmarks/swapi-schema/makeExecutableSchema.js.map +7 -0
- package/lib/benchmarks/swapi-schema/makeExecutableSchema.mjs +903 -0
- package/lib/benchmarks/swapi-schema/makeExecutableSchema.mjs.map +7 -0
- package/lib/benchmarks/swapi-schema/resolvers.d.ts.map +1 -1
- package/lib/benchmarks/swapi-schema/resolvers.js +53 -17
- package/lib/benchmarks/swapi-schema/resolvers.js.map +2 -2
- package/lib/benchmarks/swapi-schema/resolvers.mjs +54 -18
- package/lib/benchmarks/swapi-schema/resolvers.mjs.map +2 -2
- package/lib/collectFields.d.ts +28 -6
- package/lib/collectFields.d.ts.map +1 -1
- package/lib/collectFields.js +155 -28
- package/lib/collectFields.js.map +3 -3
- package/lib/collectFields.mjs +150 -29
- package/lib/collectFields.mjs.map +2 -2
- package/lib/definition.js +1 -1
- package/lib/definition.js.map +2 -2
- package/lib/definition.mjs +1 -1
- package/lib/definition.mjs.map +2 -2
- package/lib/directives.d.ts +2 -73
- package/lib/directives.d.ts.map +1 -1
- package/lib/directives.js +10 -123
- package/lib/directives.js.map +2 -2
- package/lib/directives.mjs +13 -122
- package/lib/directives.mjs.map +2 -2
- package/lib/executeWithoutSchema.d.ts +50 -13
- package/lib/executeWithoutSchema.d.ts.map +1 -1
- package/lib/executeWithoutSchema.js +1038 -184
- package/lib/executeWithoutSchema.js.map +3 -3
- package/lib/executeWithoutSchema.mjs +1049 -186
- package/lib/executeWithoutSchema.mjs.map +3 -3
- package/lib/extractImplicitTypesRuntime.js +2 -2
- package/lib/extractImplicitTypesRuntime.js.map +2 -2
- package/lib/extractImplicitTypesRuntime.mjs +2 -2
- package/lib/extractImplicitTypesRuntime.mjs.map +2 -2
- package/lib/hooks/types.d.ts +1 -1
- package/lib/hooks/types.d.ts.map +1 -1
- package/lib/index.d.ts +4 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -1
- package/lib/index.js.map +2 -2
- package/lib/index.mjs +4 -1
- package/lib/index.mjs.map +2 -2
- package/lib/jsutils/AccumulatorMap.d.ts +8 -0
- package/lib/jsutils/AccumulatorMap.d.ts.map +1 -0
- package/lib/jsutils/AccumulatorMap.js +36 -0
- package/lib/jsutils/AccumulatorMap.js.map +7 -0
- package/lib/jsutils/AccumulatorMap.mjs +17 -0
- package/lib/jsutils/AccumulatorMap.mjs.map +7 -0
- package/lib/jsutils/Maybe.d.ts +1 -1
- package/lib/jsutils/Maybe.d.ts.map +1 -1
- package/lib/jsutils/ObjMap.d.ts +2 -2
- package/lib/jsutils/ObjMap.d.ts.map +1 -1
- package/lib/jsutils/PromiseOrValue.d.ts +1 -1
- package/lib/jsutils/PromiseOrValue.d.ts.map +1 -1
- package/lib/jsutils/didYouMean.d.ts +1 -2
- package/lib/jsutils/didYouMean.d.ts.map +1 -1
- package/lib/jsutils/didYouMean.js.map +2 -2
- package/lib/jsutils/didYouMean.mjs.map +2 -2
- package/lib/jsutils/instanceOf.js.map +2 -2
- package/lib/jsutils/instanceOf.mjs.map +2 -2
- package/lib/subscribeWithSchema.d.ts +3 -2
- package/lib/subscribeWithSchema.d.ts.map +1 -1
- package/lib/subscribeWithSchema.js.map +2 -2
- package/lib/subscribeWithSchema.mjs.map +2 -2
- package/lib/subscribeWithoutSchema.d.ts +3 -35
- package/lib/subscribeWithoutSchema.d.ts.map +1 -1
- package/lib/subscribeWithoutSchema.js +1 -163
- package/lib/subscribeWithoutSchema.js.map +2 -2
- package/lib/subscribeWithoutSchema.mjs +2 -175
- package/lib/subscribeWithoutSchema.mjs.map +2 -2
- package/lib/supermassive-ast/TypedAST.d.ts +370 -0
- package/lib/supermassive-ast/TypedAST.d.ts.map +1 -0
- package/lib/supermassive-ast/TypedAST.js +29 -0
- package/lib/supermassive-ast/TypedAST.js.map +7 -0
- package/lib/supermassive-ast/TypedAST.mjs +10 -0
- package/lib/supermassive-ast/TypedAST.mjs.map +7 -0
- package/lib/supermassive-ast/addTypesToRequestDocument.d.ts +56 -0
- package/lib/supermassive-ast/addTypesToRequestDocument.d.ts.map +1 -0
- package/lib/supermassive-ast/addTypesToRequestDocument.js +473 -0
- package/lib/supermassive-ast/addTypesToRequestDocument.js.map +7 -0
- package/lib/supermassive-ast/addTypesToRequestDocument.mjs +463 -0
- package/lib/supermassive-ast/addTypesToRequestDocument.mjs.map +7 -0
- package/lib/supermassive-ast/annotateDocumentGraphQLTransform.d.ts +3 -0
- package/lib/supermassive-ast/annotateDocumentGraphQLTransform.d.ts.map +1 -0
- package/lib/supermassive-ast/annotateDocumentGraphQLTransform.js +34 -0
- package/lib/supermassive-ast/annotateDocumentGraphQLTransform.js.map +7 -0
- package/lib/supermassive-ast/annotateDocumentGraphQLTransform.mjs +17 -0
- package/lib/supermassive-ast/annotateDocumentGraphQLTransform.mjs.map +7 -0
- package/lib/supermassive-ast/directives.d.ts +36 -0
- package/lib/supermassive-ast/directives.d.ts.map +1 -0
- package/lib/supermassive-ast/directives.js +165 -0
- package/lib/supermassive-ast/directives.js.map +7 -0
- package/lib/supermassive-ast/directives.mjs +153 -0
- package/lib/supermassive-ast/directives.mjs.map +7 -0
- package/lib/supermassive-ast/index.d.ts +6 -0
- package/lib/supermassive-ast/index.d.ts.map +1 -0
- package/lib/supermassive-ast/index.js +37 -0
- package/lib/supermassive-ast/index.js.map +7 -0
- package/lib/supermassive-ast/index.mjs +27 -0
- package/lib/supermassive-ast/index.mjs.map +7 -0
- package/lib/types.d.ts +80 -24
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js +14 -0
- package/lib/types.js.map +2 -2
- package/lib/types.mjs +11 -0
- package/lib/types.mjs.map +3 -3
- package/lib/utilities/mergeResolvers.d.ts +1 -1
- package/lib/utilities/mergeResolvers.d.ts.map +1 -1
- package/lib/utilities/mergeResolvers.js.map +2 -2
- package/lib/utilities/mergeResolvers.mjs.map +2 -2
- package/lib/utilities/typeNameFromAST.d.ts +1 -1
- package/lib/utilities/typeNameFromAST.d.ts.map +1 -1
- package/lib/utilities/typeNameFromAST.js.map +1 -1
- package/lib/utilities/typeNameFromAST.mjs.map +1 -1
- package/lib/values.d.ts +3 -4
- package/lib/values.d.ts.map +1 -1
- package/lib/values.js +10 -14
- package/lib/values.js.map +2 -2
- package/lib/values.mjs +10 -14
- package/lib/values.mjs.map +2 -2
- package/package.json +4 -9
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/supermassive-ast/annotateDocumentGraphQLTransform.ts"],
|
|
4
|
+
"sourcesContent": ["import {\n FragmentDefinitionNode,\n GraphQLSchema,\n Kind,\n OperationDefinitionNode,\n} from \"graphql\";\nimport { addTypesToRequestDocument } from \"./addTypesToRequestDocument\";\n\nexport const annotateDocumentGraphQLTransform = (schema: GraphQLSchema) => {\n return (node: FragmentDefinitionNode | OperationDefinitionNode) => {\n const document = addTypesToRequestDocument(schema, {\n kind: Kind.DOCUMENT,\n definitions: [node],\n });\n return document.definitions[0];\n };\n};\n"],
|
|
5
|
+
"mappings": ";AAAA;AAAA,EAGE;AAAA,OAEK;AACP,SAAS,iCAAiC;AAEnC,IAAM,mCAAmC,CAAC,WAA0B;AACzE,SAAO,CAAC,SAA2D;AACjE,UAAM,WAAW,0BAA0B,QAAQ;AAAA,MACjD,MAAM,KAAK;AAAA,MACX,aAAa,CAAC,IAAI;AAAA,IACpB,CAAC;AACD,WAAO,SAAS,YAAY,CAAC;AAAA,EAC/B;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { GraphQLDirective } from "graphql";
|
|
2
|
+
/**
|
|
3
|
+
* Used to conditionally include fields or fragments.
|
|
4
|
+
*/
|
|
5
|
+
export declare const GraphQLIncludeDirective: GraphQLDirective;
|
|
6
|
+
/**
|
|
7
|
+
* Used to conditionally skip (exclude) fields or fragments.
|
|
8
|
+
*/
|
|
9
|
+
export declare const GraphQLSkipDirective: GraphQLDirective;
|
|
10
|
+
/**
|
|
11
|
+
* Constant string used for default reason for a deprecation.
|
|
12
|
+
*/
|
|
13
|
+
export declare const DEFAULT_DEPRECATION_REASON = "No longer supported";
|
|
14
|
+
/**
|
|
15
|
+
* Used to declare element of a GraphQL schema as deprecated.
|
|
16
|
+
*/
|
|
17
|
+
export declare const GraphQLDeprecatedDirective: GraphQLDirective;
|
|
18
|
+
/**
|
|
19
|
+
* Used to provide a URL for specifying the behaviour of custom scalar definitions.
|
|
20
|
+
*/
|
|
21
|
+
export declare const GraphQLSpecifiedByDirective: GraphQLDirective;
|
|
22
|
+
/**
|
|
23
|
+
* Used to conditionally defer fragments.
|
|
24
|
+
*/
|
|
25
|
+
export declare const GraphQLDeferDirective: GraphQLDirective;
|
|
26
|
+
/**
|
|
27
|
+
* Used to conditionally stream list fields.
|
|
28
|
+
*/
|
|
29
|
+
export declare const GraphQLStreamDirective: GraphQLDirective;
|
|
30
|
+
/**
|
|
31
|
+
* The full list of specified directives.
|
|
32
|
+
*/
|
|
33
|
+
export declare const specifiedDirectives: ReadonlyArray<GraphQLDirective>;
|
|
34
|
+
export declare function isSpecifiedDirective(directive: GraphQLDirective): boolean;
|
|
35
|
+
export declare const specifiedDirectivesSDL = "\ndirective @skip(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT\n\ndirective @include(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT\n\ndirective @deprecated(\n reason: String = \"No longer supported\"\n) on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION | ENUM_VALUE\n\ndirective @specifiedBy(url: String!) on SCALAR\n\ndirective @defer(\n label: String\n if: Boolean! = true\n) on FRAGMENT_SPREAD | INLINE_FRAGMENT\n\ndirective @stream(\n label: String\n if: Boolean! = true\n initialCount: Int = 0\n) on FIELD\n";
|
|
36
|
+
//# sourceMappingURL=directives.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"directives.d.ts","sourceRoot":"","sources":["../../src/supermassive-ast/directives.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,gBAAgB,EAEjB,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,gBAepC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,gBAejC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,0BAA0B,wBAAwB,CAAC;AAEhE;;GAEG;AACH,eAAO,MAAM,0BAA0B,EAAE,gBAkBrC,CAAC;AAEL;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,gBAWtC,CAAC;AAEL;;GAEG;AACH,eAAO,MAAM,qBAAqB,kBAmBhC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB,kBAqBjC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,aAAa,CAAC,gBAAgB,CAQ5D,CAAC;AAEL,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,gBAAgB,GAAG,OAAO,CAEzE;AAED,eAAO,MAAM,sBAAsB,ujBAqBlC,CAAC"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var directives_exports = {};
|
|
20
|
+
__export(directives_exports, {
|
|
21
|
+
DEFAULT_DEPRECATION_REASON: () => DEFAULT_DEPRECATION_REASON,
|
|
22
|
+
GraphQLDeferDirective: () => GraphQLDeferDirective,
|
|
23
|
+
GraphQLDeprecatedDirective: () => GraphQLDeprecatedDirective,
|
|
24
|
+
GraphQLIncludeDirective: () => GraphQLIncludeDirective,
|
|
25
|
+
GraphQLSkipDirective: () => GraphQLSkipDirective,
|
|
26
|
+
GraphQLSpecifiedByDirective: () => GraphQLSpecifiedByDirective,
|
|
27
|
+
GraphQLStreamDirective: () => GraphQLStreamDirective,
|
|
28
|
+
isSpecifiedDirective: () => isSpecifiedDirective,
|
|
29
|
+
specifiedDirectives: () => specifiedDirectives,
|
|
30
|
+
specifiedDirectivesSDL: () => specifiedDirectivesSDL
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(directives_exports);
|
|
33
|
+
var import_graphql = require("graphql");
|
|
34
|
+
const GraphQLIncludeDirective = new import_graphql.GraphQLDirective({
|
|
35
|
+
name: "include",
|
|
36
|
+
description: "Directs the executor to include this field or fragment only when the `if` argument is true.",
|
|
37
|
+
locations: [
|
|
38
|
+
import_graphql.DirectiveLocation.FIELD,
|
|
39
|
+
import_graphql.DirectiveLocation.FRAGMENT_SPREAD,
|
|
40
|
+
import_graphql.DirectiveLocation.INLINE_FRAGMENT
|
|
41
|
+
],
|
|
42
|
+
args: {
|
|
43
|
+
if: {
|
|
44
|
+
type: new import_graphql.GraphQLNonNull(import_graphql.GraphQLBoolean),
|
|
45
|
+
description: "Included when true."
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
const GraphQLSkipDirective = new import_graphql.GraphQLDirective({
|
|
50
|
+
name: "skip",
|
|
51
|
+
description: "Directs the executor to skip this field or fragment when the `if` argument is true.",
|
|
52
|
+
locations: [
|
|
53
|
+
import_graphql.DirectiveLocation.FIELD,
|
|
54
|
+
import_graphql.DirectiveLocation.FRAGMENT_SPREAD,
|
|
55
|
+
import_graphql.DirectiveLocation.INLINE_FRAGMENT
|
|
56
|
+
],
|
|
57
|
+
args: {
|
|
58
|
+
if: {
|
|
59
|
+
type: new import_graphql.GraphQLNonNull(import_graphql.GraphQLBoolean),
|
|
60
|
+
description: "Skipped when true."
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
const DEFAULT_DEPRECATION_REASON = "No longer supported";
|
|
65
|
+
const GraphQLDeprecatedDirective = new import_graphql.GraphQLDirective({
|
|
66
|
+
name: "deprecated",
|
|
67
|
+
description: "Marks an element of a GraphQL schema as no longer supported.",
|
|
68
|
+
locations: [
|
|
69
|
+
import_graphql.DirectiveLocation.FIELD_DEFINITION,
|
|
70
|
+
import_graphql.DirectiveLocation.ARGUMENT_DEFINITION,
|
|
71
|
+
import_graphql.DirectiveLocation.INPUT_FIELD_DEFINITION,
|
|
72
|
+
import_graphql.DirectiveLocation.ENUM_VALUE
|
|
73
|
+
],
|
|
74
|
+
args: {
|
|
75
|
+
reason: {
|
|
76
|
+
type: import_graphql.GraphQLString,
|
|
77
|
+
description: "Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",
|
|
78
|
+
defaultValue: DEFAULT_DEPRECATION_REASON
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
const GraphQLSpecifiedByDirective = new import_graphql.GraphQLDirective({
|
|
83
|
+
name: "specifiedBy",
|
|
84
|
+
description: "Exposes a URL that specifies the behaviour of this scalar.",
|
|
85
|
+
locations: [import_graphql.DirectiveLocation.SCALAR],
|
|
86
|
+
args: {
|
|
87
|
+
url: {
|
|
88
|
+
type: new import_graphql.GraphQLNonNull(import_graphql.GraphQLString),
|
|
89
|
+
description: "The URL that specifies the behaviour of this scalar."
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
const GraphQLDeferDirective = new import_graphql.GraphQLDirective({
|
|
94
|
+
name: "defer",
|
|
95
|
+
description: "Directs the executor to defer this fragment when the `if` argument is true or undefined.",
|
|
96
|
+
locations: [
|
|
97
|
+
import_graphql.DirectiveLocation.FRAGMENT_SPREAD,
|
|
98
|
+
import_graphql.DirectiveLocation.INLINE_FRAGMENT
|
|
99
|
+
],
|
|
100
|
+
args: {
|
|
101
|
+
if: {
|
|
102
|
+
type: new import_graphql.GraphQLNonNull(import_graphql.GraphQLBoolean),
|
|
103
|
+
description: "Deferred when true or undefined.",
|
|
104
|
+
defaultValue: true
|
|
105
|
+
},
|
|
106
|
+
label: {
|
|
107
|
+
type: import_graphql.GraphQLString,
|
|
108
|
+
description: "Unique name"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
const GraphQLStreamDirective = new import_graphql.GraphQLDirective({
|
|
113
|
+
name: "stream",
|
|
114
|
+
description: "Directs the executor to stream plural fields when the `if` argument is true or undefined.",
|
|
115
|
+
locations: [import_graphql.DirectiveLocation.FIELD],
|
|
116
|
+
args: {
|
|
117
|
+
if: {
|
|
118
|
+
type: new import_graphql.GraphQLNonNull(import_graphql.GraphQLBoolean),
|
|
119
|
+
description: "Stream when true or undefined.",
|
|
120
|
+
defaultValue: true
|
|
121
|
+
},
|
|
122
|
+
label: {
|
|
123
|
+
type: import_graphql.GraphQLString,
|
|
124
|
+
description: "Unique name"
|
|
125
|
+
},
|
|
126
|
+
initialCount: {
|
|
127
|
+
defaultValue: 0,
|
|
128
|
+
type: import_graphql.GraphQLInt,
|
|
129
|
+
description: "Number of items to return immediately"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
const specifiedDirectives = Object.freeze([
|
|
134
|
+
GraphQLIncludeDirective,
|
|
135
|
+
GraphQLSkipDirective,
|
|
136
|
+
GraphQLDeprecatedDirective,
|
|
137
|
+
GraphQLSpecifiedByDirective,
|
|
138
|
+
GraphQLDeferDirective,
|
|
139
|
+
GraphQLStreamDirective
|
|
140
|
+
]);
|
|
141
|
+
function isSpecifiedDirective(directive) {
|
|
142
|
+
return specifiedDirectives.some(({ name }) => name === directive.name);
|
|
143
|
+
}
|
|
144
|
+
const specifiedDirectivesSDL = `
|
|
145
|
+
directive @skip(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
|
|
146
|
+
|
|
147
|
+
directive @include(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
|
|
148
|
+
|
|
149
|
+
directive @deprecated(
|
|
150
|
+
reason: String = "No longer supported"
|
|
151
|
+
) on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION | ENUM_VALUE
|
|
152
|
+
|
|
153
|
+
directive @specifiedBy(url: String!) on SCALAR
|
|
154
|
+
|
|
155
|
+
directive @defer(
|
|
156
|
+
label: String
|
|
157
|
+
if: Boolean! = true
|
|
158
|
+
) on FRAGMENT_SPREAD | INLINE_FRAGMENT
|
|
159
|
+
|
|
160
|
+
directive @stream(
|
|
161
|
+
label: String
|
|
162
|
+
if: Boolean! = true
|
|
163
|
+
initialCount: Int = 0
|
|
164
|
+
) on FIELD
|
|
165
|
+
`;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/supermassive-ast/directives.ts"],
|
|
4
|
+
"sourcesContent": ["import {\n GraphQLString,\n GraphQLBoolean,\n GraphQLNonNull,\n DirectiveLocation,\n GraphQLDirective,\n GraphQLInt,\n} from \"graphql\";\n\n/**\n * Used to conditionally include fields or fragments.\n */\nexport const GraphQLIncludeDirective: GraphQLDirective = new GraphQLDirective({\n name: \"include\",\n description:\n \"Directs the executor to include this field or fragment only when the `if` argument is true.\",\n locations: [\n DirectiveLocation.FIELD,\n DirectiveLocation.FRAGMENT_SPREAD,\n DirectiveLocation.INLINE_FRAGMENT,\n ],\n args: {\n if: {\n type: new GraphQLNonNull(GraphQLBoolean),\n description: \"Included when true.\",\n },\n },\n});\n\n/**\n * Used to conditionally skip (exclude) fields or fragments.\n */\nexport const GraphQLSkipDirective: GraphQLDirective = new GraphQLDirective({\n name: \"skip\",\n description:\n \"Directs the executor to skip this field or fragment when the `if` argument is true.\",\n locations: [\n DirectiveLocation.FIELD,\n DirectiveLocation.FRAGMENT_SPREAD,\n DirectiveLocation.INLINE_FRAGMENT,\n ],\n args: {\n if: {\n type: new GraphQLNonNull(GraphQLBoolean),\n description: \"Skipped when true.\",\n },\n },\n});\n\n/**\n * Constant string used for default reason for a deprecation.\n */\nexport const DEFAULT_DEPRECATION_REASON = \"No longer supported\";\n\n/**\n * Used to declare element of a GraphQL schema as deprecated.\n */\nexport const GraphQLDeprecatedDirective: GraphQLDirective =\n new GraphQLDirective({\n name: \"deprecated\",\n description: \"Marks an element of a GraphQL schema as no longer supported.\",\n locations: [\n DirectiveLocation.FIELD_DEFINITION,\n DirectiveLocation.ARGUMENT_DEFINITION,\n DirectiveLocation.INPUT_FIELD_DEFINITION,\n DirectiveLocation.ENUM_VALUE,\n ],\n args: {\n reason: {\n type: GraphQLString,\n description:\n \"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).\",\n defaultValue: DEFAULT_DEPRECATION_REASON,\n },\n },\n });\n\n/**\n * Used to provide a URL for specifying the behaviour of custom scalar definitions.\n */\nexport const GraphQLSpecifiedByDirective: GraphQLDirective =\n new GraphQLDirective({\n name: \"specifiedBy\",\n description: \"Exposes a URL that specifies the behaviour of this scalar.\",\n locations: [DirectiveLocation.SCALAR],\n args: {\n url: {\n type: new GraphQLNonNull(GraphQLString),\n description: \"The URL that specifies the behaviour of this scalar.\",\n },\n },\n });\n\n/**\n * Used to conditionally defer fragments.\n */\nexport const GraphQLDeferDirective = new GraphQLDirective({\n name: \"defer\",\n description:\n \"Directs the executor to defer this fragment when the `if` argument is true or undefined.\",\n locations: [\n DirectiveLocation.FRAGMENT_SPREAD,\n DirectiveLocation.INLINE_FRAGMENT,\n ],\n args: {\n if: {\n type: new GraphQLNonNull(GraphQLBoolean),\n description: \"Deferred when true or undefined.\",\n defaultValue: true,\n },\n label: {\n type: GraphQLString,\n description: \"Unique name\",\n },\n },\n});\n\n/**\n * Used to conditionally stream list fields.\n */\nexport const GraphQLStreamDirective = new GraphQLDirective({\n name: \"stream\",\n description:\n \"Directs the executor to stream plural fields when the `if` argument is true or undefined.\",\n locations: [DirectiveLocation.FIELD],\n args: {\n if: {\n type: new GraphQLNonNull(GraphQLBoolean),\n description: \"Stream when true or undefined.\",\n defaultValue: true,\n },\n label: {\n type: GraphQLString,\n description: \"Unique name\",\n },\n initialCount: {\n defaultValue: 0,\n type: GraphQLInt,\n description: \"Number of items to return immediately\",\n },\n },\n});\n\n/**\n * The full list of specified directives.\n */\nexport const specifiedDirectives: ReadonlyArray<GraphQLDirective> =\n Object.freeze([\n GraphQLIncludeDirective,\n GraphQLSkipDirective,\n GraphQLDeprecatedDirective,\n GraphQLSpecifiedByDirective,\n GraphQLDeferDirective,\n GraphQLStreamDirective,\n ]);\n\nexport function isSpecifiedDirective(directive: GraphQLDirective): boolean {\n return specifiedDirectives.some(({ name }) => name === directive.name);\n}\n\nexport const specifiedDirectivesSDL = `\ndirective @skip(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT\n\ndirective @include(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT\n\ndirective @deprecated(\n reason: String = \"No longer supported\"\n) on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION | ENUM_VALUE\n\ndirective @specifiedBy(url: String!) on SCALAR\n\ndirective @defer(\n label: String\n if: Boolean! = true\n) on FRAGMENT_SPREAD | INLINE_FRAGMENT\n\ndirective @stream(\n label: String\n if: Boolean! = true\n initialCount: Int = 0\n) on FIELD\n`;\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
// src/supermassive-ast/directives.ts
|
|
2
|
+
import {
|
|
3
|
+
GraphQLString,
|
|
4
|
+
GraphQLBoolean,
|
|
5
|
+
GraphQLNonNull,
|
|
6
|
+
DirectiveLocation,
|
|
7
|
+
GraphQLDirective,
|
|
8
|
+
GraphQLInt
|
|
9
|
+
} from "graphql";
|
|
10
|
+
var GraphQLIncludeDirective = new GraphQLDirective({
|
|
11
|
+
name: "include",
|
|
12
|
+
description: "Directs the executor to include this field or fragment only when the `if` argument is true.",
|
|
13
|
+
locations: [
|
|
14
|
+
DirectiveLocation.FIELD,
|
|
15
|
+
DirectiveLocation.FRAGMENT_SPREAD,
|
|
16
|
+
DirectiveLocation.INLINE_FRAGMENT
|
|
17
|
+
],
|
|
18
|
+
args: {
|
|
19
|
+
if: {
|
|
20
|
+
type: new GraphQLNonNull(GraphQLBoolean),
|
|
21
|
+
description: "Included when true."
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
var GraphQLSkipDirective = new GraphQLDirective({
|
|
26
|
+
name: "skip",
|
|
27
|
+
description: "Directs the executor to skip this field or fragment when the `if` argument is true.",
|
|
28
|
+
locations: [
|
|
29
|
+
DirectiveLocation.FIELD,
|
|
30
|
+
DirectiveLocation.FRAGMENT_SPREAD,
|
|
31
|
+
DirectiveLocation.INLINE_FRAGMENT
|
|
32
|
+
],
|
|
33
|
+
args: {
|
|
34
|
+
if: {
|
|
35
|
+
type: new GraphQLNonNull(GraphQLBoolean),
|
|
36
|
+
description: "Skipped when true."
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
var DEFAULT_DEPRECATION_REASON = "No longer supported";
|
|
41
|
+
var GraphQLDeprecatedDirective = new GraphQLDirective({
|
|
42
|
+
name: "deprecated",
|
|
43
|
+
description: "Marks an element of a GraphQL schema as no longer supported.",
|
|
44
|
+
locations: [
|
|
45
|
+
DirectiveLocation.FIELD_DEFINITION,
|
|
46
|
+
DirectiveLocation.ARGUMENT_DEFINITION,
|
|
47
|
+
DirectiveLocation.INPUT_FIELD_DEFINITION,
|
|
48
|
+
DirectiveLocation.ENUM_VALUE
|
|
49
|
+
],
|
|
50
|
+
args: {
|
|
51
|
+
reason: {
|
|
52
|
+
type: GraphQLString,
|
|
53
|
+
description: "Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",
|
|
54
|
+
defaultValue: DEFAULT_DEPRECATION_REASON
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
var GraphQLSpecifiedByDirective = new GraphQLDirective({
|
|
59
|
+
name: "specifiedBy",
|
|
60
|
+
description: "Exposes a URL that specifies the behaviour of this scalar.",
|
|
61
|
+
locations: [DirectiveLocation.SCALAR],
|
|
62
|
+
args: {
|
|
63
|
+
url: {
|
|
64
|
+
type: new GraphQLNonNull(GraphQLString),
|
|
65
|
+
description: "The URL that specifies the behaviour of this scalar."
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
var GraphQLDeferDirective = new GraphQLDirective({
|
|
70
|
+
name: "defer",
|
|
71
|
+
description: "Directs the executor to defer this fragment when the `if` argument is true or undefined.",
|
|
72
|
+
locations: [
|
|
73
|
+
DirectiveLocation.FRAGMENT_SPREAD,
|
|
74
|
+
DirectiveLocation.INLINE_FRAGMENT
|
|
75
|
+
],
|
|
76
|
+
args: {
|
|
77
|
+
if: {
|
|
78
|
+
type: new GraphQLNonNull(GraphQLBoolean),
|
|
79
|
+
description: "Deferred when true or undefined.",
|
|
80
|
+
defaultValue: true
|
|
81
|
+
},
|
|
82
|
+
label: {
|
|
83
|
+
type: GraphQLString,
|
|
84
|
+
description: "Unique name"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
var GraphQLStreamDirective = new GraphQLDirective({
|
|
89
|
+
name: "stream",
|
|
90
|
+
description: "Directs the executor to stream plural fields when the `if` argument is true or undefined.",
|
|
91
|
+
locations: [DirectiveLocation.FIELD],
|
|
92
|
+
args: {
|
|
93
|
+
if: {
|
|
94
|
+
type: new GraphQLNonNull(GraphQLBoolean),
|
|
95
|
+
description: "Stream when true or undefined.",
|
|
96
|
+
defaultValue: true
|
|
97
|
+
},
|
|
98
|
+
label: {
|
|
99
|
+
type: GraphQLString,
|
|
100
|
+
description: "Unique name"
|
|
101
|
+
},
|
|
102
|
+
initialCount: {
|
|
103
|
+
defaultValue: 0,
|
|
104
|
+
type: GraphQLInt,
|
|
105
|
+
description: "Number of items to return immediately"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
var specifiedDirectives = Object.freeze([
|
|
110
|
+
GraphQLIncludeDirective,
|
|
111
|
+
GraphQLSkipDirective,
|
|
112
|
+
GraphQLDeprecatedDirective,
|
|
113
|
+
GraphQLSpecifiedByDirective,
|
|
114
|
+
GraphQLDeferDirective,
|
|
115
|
+
GraphQLStreamDirective
|
|
116
|
+
]);
|
|
117
|
+
function isSpecifiedDirective(directive) {
|
|
118
|
+
return specifiedDirectives.some(({ name }) => name === directive.name);
|
|
119
|
+
}
|
|
120
|
+
var specifiedDirectivesSDL = `
|
|
121
|
+
directive @skip(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
|
|
122
|
+
|
|
123
|
+
directive @include(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
|
|
124
|
+
|
|
125
|
+
directive @deprecated(
|
|
126
|
+
reason: String = "No longer supported"
|
|
127
|
+
) on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION | ENUM_VALUE
|
|
128
|
+
|
|
129
|
+
directive @specifiedBy(url: String!) on SCALAR
|
|
130
|
+
|
|
131
|
+
directive @defer(
|
|
132
|
+
label: String
|
|
133
|
+
if: Boolean! = true
|
|
134
|
+
) on FRAGMENT_SPREAD | INLINE_FRAGMENT
|
|
135
|
+
|
|
136
|
+
directive @stream(
|
|
137
|
+
label: String
|
|
138
|
+
if: Boolean! = true
|
|
139
|
+
initialCount: Int = 0
|
|
140
|
+
) on FIELD
|
|
141
|
+
`;
|
|
142
|
+
export {
|
|
143
|
+
DEFAULT_DEPRECATION_REASON,
|
|
144
|
+
GraphQLDeferDirective,
|
|
145
|
+
GraphQLDeprecatedDirective,
|
|
146
|
+
GraphQLIncludeDirective,
|
|
147
|
+
GraphQLSkipDirective,
|
|
148
|
+
GraphQLSpecifiedByDirective,
|
|
149
|
+
GraphQLStreamDirective,
|
|
150
|
+
isSpecifiedDirective,
|
|
151
|
+
specifiedDirectives,
|
|
152
|
+
specifiedDirectivesSDL
|
|
153
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/supermassive-ast/directives.ts"],
|
|
4
|
+
"sourcesContent": ["import {\n GraphQLString,\n GraphQLBoolean,\n GraphQLNonNull,\n DirectiveLocation,\n GraphQLDirective,\n GraphQLInt,\n} from \"graphql\";\n\n/**\n * Used to conditionally include fields or fragments.\n */\nexport const GraphQLIncludeDirective: GraphQLDirective = new GraphQLDirective({\n name: \"include\",\n description:\n \"Directs the executor to include this field or fragment only when the `if` argument is true.\",\n locations: [\n DirectiveLocation.FIELD,\n DirectiveLocation.FRAGMENT_SPREAD,\n DirectiveLocation.INLINE_FRAGMENT,\n ],\n args: {\n if: {\n type: new GraphQLNonNull(GraphQLBoolean),\n description: \"Included when true.\",\n },\n },\n});\n\n/**\n * Used to conditionally skip (exclude) fields or fragments.\n */\nexport const GraphQLSkipDirective: GraphQLDirective = new GraphQLDirective({\n name: \"skip\",\n description:\n \"Directs the executor to skip this field or fragment when the `if` argument is true.\",\n locations: [\n DirectiveLocation.FIELD,\n DirectiveLocation.FRAGMENT_SPREAD,\n DirectiveLocation.INLINE_FRAGMENT,\n ],\n args: {\n if: {\n type: new GraphQLNonNull(GraphQLBoolean),\n description: \"Skipped when true.\",\n },\n },\n});\n\n/**\n * Constant string used for default reason for a deprecation.\n */\nexport const DEFAULT_DEPRECATION_REASON = \"No longer supported\";\n\n/**\n * Used to declare element of a GraphQL schema as deprecated.\n */\nexport const GraphQLDeprecatedDirective: GraphQLDirective =\n new GraphQLDirective({\n name: \"deprecated\",\n description: \"Marks an element of a GraphQL schema as no longer supported.\",\n locations: [\n DirectiveLocation.FIELD_DEFINITION,\n DirectiveLocation.ARGUMENT_DEFINITION,\n DirectiveLocation.INPUT_FIELD_DEFINITION,\n DirectiveLocation.ENUM_VALUE,\n ],\n args: {\n reason: {\n type: GraphQLString,\n description:\n \"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).\",\n defaultValue: DEFAULT_DEPRECATION_REASON,\n },\n },\n });\n\n/**\n * Used to provide a URL for specifying the behaviour of custom scalar definitions.\n */\nexport const GraphQLSpecifiedByDirective: GraphQLDirective =\n new GraphQLDirective({\n name: \"specifiedBy\",\n description: \"Exposes a URL that specifies the behaviour of this scalar.\",\n locations: [DirectiveLocation.SCALAR],\n args: {\n url: {\n type: new GraphQLNonNull(GraphQLString),\n description: \"The URL that specifies the behaviour of this scalar.\",\n },\n },\n });\n\n/**\n * Used to conditionally defer fragments.\n */\nexport const GraphQLDeferDirective = new GraphQLDirective({\n name: \"defer\",\n description:\n \"Directs the executor to defer this fragment when the `if` argument is true or undefined.\",\n locations: [\n DirectiveLocation.FRAGMENT_SPREAD,\n DirectiveLocation.INLINE_FRAGMENT,\n ],\n args: {\n if: {\n type: new GraphQLNonNull(GraphQLBoolean),\n description: \"Deferred when true or undefined.\",\n defaultValue: true,\n },\n label: {\n type: GraphQLString,\n description: \"Unique name\",\n },\n },\n});\n\n/**\n * Used to conditionally stream list fields.\n */\nexport const GraphQLStreamDirective = new GraphQLDirective({\n name: \"stream\",\n description:\n \"Directs the executor to stream plural fields when the `if` argument is true or undefined.\",\n locations: [DirectiveLocation.FIELD],\n args: {\n if: {\n type: new GraphQLNonNull(GraphQLBoolean),\n description: \"Stream when true or undefined.\",\n defaultValue: true,\n },\n label: {\n type: GraphQLString,\n description: \"Unique name\",\n },\n initialCount: {\n defaultValue: 0,\n type: GraphQLInt,\n description: \"Number of items to return immediately\",\n },\n },\n});\n\n/**\n * The full list of specified directives.\n */\nexport const specifiedDirectives: ReadonlyArray<GraphQLDirective> =\n Object.freeze([\n GraphQLIncludeDirective,\n GraphQLSkipDirective,\n GraphQLDeprecatedDirective,\n GraphQLSpecifiedByDirective,\n GraphQLDeferDirective,\n GraphQLStreamDirective,\n ]);\n\nexport function isSpecifiedDirective(directive: GraphQLDirective): boolean {\n return specifiedDirectives.some(({ name }) => name === directive.name);\n}\n\nexport const specifiedDirectivesSDL = `\ndirective @skip(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT\n\ndirective @include(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT\n\ndirective @deprecated(\n reason: String = \"No longer supported\"\n) on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION | ENUM_VALUE\n\ndirective @specifiedBy(url: String!) on SCALAR\n\ndirective @defer(\n label: String\n if: Boolean! = true\n) on FRAGMENT_SPREAD | INLINE_FRAGMENT\n\ndirective @stream(\n label: String\n if: Boolean! = true\n initialCount: Int = 0\n) on FIELD\n`;\n"],
|
|
5
|
+
"mappings": ";AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAKA,IAAM,0BAA4C,IAAI,iBAAiB;AAAA,EAC5E,MAAM;AAAA,EACN,aACE;AAAA,EACF,WAAW;AAAA,IACT,kBAAkB;AAAA,IAClB,kBAAkB;AAAA,IAClB,kBAAkB;AAAA,EACpB;AAAA,EACA,MAAM;AAAA,IACJ,IAAI;AAAA,MACF,MAAM,IAAI,eAAe,cAAc;AAAA,MACvC,aAAa;AAAA,IACf;AAAA,EACF;AACF,CAAC;AAKM,IAAM,uBAAyC,IAAI,iBAAiB;AAAA,EACzE,MAAM;AAAA,EACN,aACE;AAAA,EACF,WAAW;AAAA,IACT,kBAAkB;AAAA,IAClB,kBAAkB;AAAA,IAClB,kBAAkB;AAAA,EACpB;AAAA,EACA,MAAM;AAAA,IACJ,IAAI;AAAA,MACF,MAAM,IAAI,eAAe,cAAc;AAAA,MACvC,aAAa;AAAA,IACf;AAAA,EACF;AACF,CAAC;AAKM,IAAM,6BAA6B;AAKnC,IAAM,6BACX,IAAI,iBAAiB;AAAA,EACnB,MAAM;AAAA,EACN,aAAa;AAAA,EACb,WAAW;AAAA,IACT,kBAAkB;AAAA,IAClB,kBAAkB;AAAA,IAClB,kBAAkB;AAAA,IAClB,kBAAkB;AAAA,EACpB;AAAA,EACA,MAAM;AAAA,IACJ,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,aACE;AAAA,MACF,cAAc;AAAA,IAChB;AAAA,EACF;AACF,CAAC;AAKI,IAAM,8BACX,IAAI,iBAAiB;AAAA,EACnB,MAAM;AAAA,EACN,aAAa;AAAA,EACb,WAAW,CAAC,kBAAkB,MAAM;AAAA,EACpC,MAAM;AAAA,IACJ,KAAK;AAAA,MACH,MAAM,IAAI,eAAe,aAAa;AAAA,MACtC,aAAa;AAAA,IACf;AAAA,EACF;AACF,CAAC;AAKI,IAAM,wBAAwB,IAAI,iBAAiB;AAAA,EACxD,MAAM;AAAA,EACN,aACE;AAAA,EACF,WAAW;AAAA,IACT,kBAAkB;AAAA,IAClB,kBAAkB;AAAA,EACpB;AAAA,EACA,MAAM;AAAA,IACJ,IAAI;AAAA,MACF,MAAM,IAAI,eAAe,cAAc;AAAA,MACvC,aAAa;AAAA,MACb,cAAc;AAAA,IAChB;AAAA,IACA,OAAO;AAAA,MACL,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,EACF;AACF,CAAC;AAKM,IAAM,yBAAyB,IAAI,iBAAiB;AAAA,EACzD,MAAM;AAAA,EACN,aACE;AAAA,EACF,WAAW,CAAC,kBAAkB,KAAK;AAAA,EACnC,MAAM;AAAA,IACJ,IAAI;AAAA,MACF,MAAM,IAAI,eAAe,cAAc;AAAA,MACvC,aAAa;AAAA,MACb,cAAc;AAAA,IAChB;AAAA,IACA,OAAO;AAAA,MACL,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,cAAc;AAAA,MACZ,cAAc;AAAA,MACd,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,EACF;AACF,CAAC;AAKM,IAAM,sBACX,OAAO,OAAO;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAEI,SAAS,qBAAqB,WAAsC;AACzE,SAAO,oBAAoB,KAAK,CAAC,EAAE,KAAK,MAAM,SAAS,UAAU,IAAI;AACvE;AAEO,IAAM,yBAAyB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type { NameNode, DocumentNode, OperationDefinitionNode, VariableDefinitionNode, VariableNode, SelectionSetNode, FieldNode, ArgumentNode, FragmentSpreadNode, InlineFragmentNode, FragmentDefinitionNode, IntValueNode, FloatValueNode, StringValueNode, BooleanValueNode, NullValueNode, EnumValueNode, ListValueNode, ObjectValueNode, ObjectFieldNode, DirectiveNode, NamedTypeNode, ListTypeNode, NonNullTypeNode, SchemaDefinitionNode, OperationTypeDefinitionNode, ScalarTypeDefinitionNode, ObjectTypeDefinitionNode, FieldDefinitionNode, InputValueDefinitionNode, InterfaceTypeDefinitionNode, UnionTypeDefinitionNode, EnumTypeDefinitionNode, EnumValueDefinitionNode, InputObjectTypeDefinitionNode, DirectiveDefinitionNode, SchemaExtensionNode, ScalarTypeExtensionNode, ObjectTypeExtensionNode, InterfaceTypeExtensionNode, UnionTypeExtensionNode, EnumTypeExtensionNode, InputObjectTypeExtensionNode, SelectionNode, TypeNode, } from "./TypedAST";
|
|
2
|
+
export { OperationTypeNode } from "./TypedAST";
|
|
3
|
+
export { addTypesToRequestDocument } from "./addTypesToRequestDocument";
|
|
4
|
+
export { annotateDocumentGraphQLTransform } from "./annotateDocumentGraphQLTransform";
|
|
5
|
+
export { specifiedDirectives, isSpecifiedDirective, GraphQLIncludeDirective, GraphQLSkipDirective, GraphQLDeprecatedDirective, GraphQLSpecifiedByDirective, GraphQLDeferDirective, GraphQLStreamDirective, } from "./directives";
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/supermassive-ast/index.ts"],"names":[],"mappings":"AAAA,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,EAC5B,aAAa,EACb,QAAQ,GACT,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AAEtF,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,0BAA0B,EAC1B,2BAA2B,EAC3B,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var supermassive_ast_exports = {};
|
|
20
|
+
__export(supermassive_ast_exports, {
|
|
21
|
+
GraphQLDeferDirective: () => import_directives.GraphQLDeferDirective,
|
|
22
|
+
GraphQLDeprecatedDirective: () => import_directives.GraphQLDeprecatedDirective,
|
|
23
|
+
GraphQLIncludeDirective: () => import_directives.GraphQLIncludeDirective,
|
|
24
|
+
GraphQLSkipDirective: () => import_directives.GraphQLSkipDirective,
|
|
25
|
+
GraphQLSpecifiedByDirective: () => import_directives.GraphQLSpecifiedByDirective,
|
|
26
|
+
GraphQLStreamDirective: () => import_directives.GraphQLStreamDirective,
|
|
27
|
+
OperationTypeNode: () => import_TypedAST.OperationTypeNode,
|
|
28
|
+
addTypesToRequestDocument: () => import_addTypesToRequestDocument.addTypesToRequestDocument,
|
|
29
|
+
annotateDocumentGraphQLTransform: () => import_annotateDocumentGraphQLTransform.annotateDocumentGraphQLTransform,
|
|
30
|
+
isSpecifiedDirective: () => import_directives.isSpecifiedDirective,
|
|
31
|
+
specifiedDirectives: () => import_directives.specifiedDirectives
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(supermassive_ast_exports);
|
|
34
|
+
var import_TypedAST = require("./TypedAST");
|
|
35
|
+
var import_addTypesToRequestDocument = require("./addTypesToRequestDocument");
|
|
36
|
+
var import_annotateDocumentGraphQLTransform = require("./annotateDocumentGraphQLTransform");
|
|
37
|
+
var import_directives = require("./directives");
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/supermassive-ast/index.ts"],
|
|
4
|
+
"sourcesContent": ["export type {\n NameNode,\n DocumentNode,\n OperationDefinitionNode,\n VariableDefinitionNode,\n VariableNode,\n SelectionSetNode,\n FieldNode,\n ArgumentNode,\n FragmentSpreadNode,\n InlineFragmentNode,\n FragmentDefinitionNode,\n IntValueNode,\n FloatValueNode,\n StringValueNode,\n BooleanValueNode,\n NullValueNode,\n EnumValueNode,\n ListValueNode,\n ObjectValueNode,\n ObjectFieldNode,\n DirectiveNode,\n NamedTypeNode,\n ListTypeNode,\n NonNullTypeNode,\n SchemaDefinitionNode,\n OperationTypeDefinitionNode,\n ScalarTypeDefinitionNode,\n ObjectTypeDefinitionNode,\n FieldDefinitionNode,\n InputValueDefinitionNode,\n InterfaceTypeDefinitionNode,\n UnionTypeDefinitionNode,\n EnumTypeDefinitionNode,\n EnumValueDefinitionNode,\n InputObjectTypeDefinitionNode,\n DirectiveDefinitionNode,\n SchemaExtensionNode,\n ScalarTypeExtensionNode,\n ObjectTypeExtensionNode,\n InterfaceTypeExtensionNode,\n UnionTypeExtensionNode,\n EnumTypeExtensionNode,\n InputObjectTypeExtensionNode,\n SelectionNode,\n TypeNode,\n} from \"./TypedAST\";\nexport { OperationTypeNode } from \"./TypedAST\";\nexport { addTypesToRequestDocument } from \"./addTypesToRequestDocument\";\nexport { annotateDocumentGraphQLTransform } from \"./annotateDocumentGraphQLTransform\";\n\nexport {\n specifiedDirectives,\n isSpecifiedDirective,\n GraphQLIncludeDirective,\n GraphQLSkipDirective,\n GraphQLDeprecatedDirective,\n GraphQLSpecifiedByDirective,\n GraphQLDeferDirective,\n GraphQLStreamDirective,\n} from \"./directives\";\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA+CA,sBAAkC;AAClC,uCAA0C;AAC1C,8CAAiD;AAEjD,wBASO;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// src/supermassive-ast/index.ts
|
|
2
|
+
import { OperationTypeNode } from "./TypedAST.mjs";
|
|
3
|
+
import { addTypesToRequestDocument } from "./addTypesToRequestDocument.mjs";
|
|
4
|
+
import { annotateDocumentGraphQLTransform } from "./annotateDocumentGraphQLTransform.mjs";
|
|
5
|
+
import {
|
|
6
|
+
specifiedDirectives,
|
|
7
|
+
isSpecifiedDirective,
|
|
8
|
+
GraphQLIncludeDirective,
|
|
9
|
+
GraphQLSkipDirective,
|
|
10
|
+
GraphQLDeprecatedDirective,
|
|
11
|
+
GraphQLSpecifiedByDirective,
|
|
12
|
+
GraphQLDeferDirective,
|
|
13
|
+
GraphQLStreamDirective
|
|
14
|
+
} from "./directives.mjs";
|
|
15
|
+
export {
|
|
16
|
+
GraphQLDeferDirective,
|
|
17
|
+
GraphQLDeprecatedDirective,
|
|
18
|
+
GraphQLIncludeDirective,
|
|
19
|
+
GraphQLSkipDirective,
|
|
20
|
+
GraphQLSpecifiedByDirective,
|
|
21
|
+
GraphQLStreamDirective,
|
|
22
|
+
OperationTypeNode,
|
|
23
|
+
addTypesToRequestDocument,
|
|
24
|
+
annotateDocumentGraphQLTransform,
|
|
25
|
+
isSpecifiedDirective,
|
|
26
|
+
specifiedDirectives
|
|
27
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/supermassive-ast/index.ts"],
|
|
4
|
+
"sourcesContent": ["export type {\n NameNode,\n DocumentNode,\n OperationDefinitionNode,\n VariableDefinitionNode,\n VariableNode,\n SelectionSetNode,\n FieldNode,\n ArgumentNode,\n FragmentSpreadNode,\n InlineFragmentNode,\n FragmentDefinitionNode,\n IntValueNode,\n FloatValueNode,\n StringValueNode,\n BooleanValueNode,\n NullValueNode,\n EnumValueNode,\n ListValueNode,\n ObjectValueNode,\n ObjectFieldNode,\n DirectiveNode,\n NamedTypeNode,\n ListTypeNode,\n NonNullTypeNode,\n SchemaDefinitionNode,\n OperationTypeDefinitionNode,\n ScalarTypeDefinitionNode,\n ObjectTypeDefinitionNode,\n FieldDefinitionNode,\n InputValueDefinitionNode,\n InterfaceTypeDefinitionNode,\n UnionTypeDefinitionNode,\n EnumTypeDefinitionNode,\n EnumValueDefinitionNode,\n InputObjectTypeDefinitionNode,\n DirectiveDefinitionNode,\n SchemaExtensionNode,\n ScalarTypeExtensionNode,\n ObjectTypeExtensionNode,\n InterfaceTypeExtensionNode,\n UnionTypeExtensionNode,\n EnumTypeExtensionNode,\n InputObjectTypeExtensionNode,\n SelectionNode,\n TypeNode,\n} from \"./TypedAST\";\nexport { OperationTypeNode } from \"./TypedAST\";\nexport { addTypesToRequestDocument } from \"./addTypesToRequestDocument\";\nexport { annotateDocumentGraphQLTransform } from \"./annotateDocumentGraphQLTransform\";\n\nexport {\n specifiedDirectives,\n isSpecifiedDirective,\n GraphQLIncludeDirective,\n GraphQLSkipDirective,\n GraphQLDeprecatedDirective,\n GraphQLSpecifiedByDirective,\n GraphQLDeferDirective,\n GraphQLStreamDirective,\n} from \"./directives\";\n"],
|
|
5
|
+
"mappings": ";AA+CA,SAAS,yBAAyB;AAClC,SAAS,iCAAiC;AAC1C,SAAS,wCAAwC;AAEjD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|