grafast 0.1.1-beta.2 → 0.1.1-beta.21
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/README.md +2 -3
- package/dist/args.d.ts +4 -7
- package/dist/args.js +53 -38
- package/dist/assert.js +2 -3
- package/dist/bucket.d.ts +1 -89
- package/dist/config.d.ts +0 -17
- package/dist/config.js +1 -95
- package/dist/constraints.d.ts +15 -1
- package/dist/constraints.js +41 -3
- package/dist/deferred.js +1 -2
- package/dist/dev.d.ts +1 -4
- package/dist/dev.js +18 -3
- package/dist/engine/LayerPlan.d.ts +21 -111
- package/dist/engine/LayerPlan.js +196 -78
- package/dist/engine/OperationPlan.d.ts +30 -104
- package/dist/engine/OperationPlan.js +763 -471
- package/dist/engine/OutputPlan.d.ts +9 -20
- package/dist/engine/OutputPlan.js +432 -444
- package/dist/engine/StepTracker.d.ts +1 -95
- package/dist/engine/StepTracker.js +94 -20
- package/dist/engine/executeBucket.d.ts +5 -7
- package/dist/engine/executeBucket.js +646 -244
- package/dist/engine/executeOutputPlan.d.ts +0 -53
- package/dist/engine/executeOutputPlan.js +7 -2
- package/dist/engine/lib/defaultPlanResolver.d.ts +6 -0
- package/dist/engine/lib/defaultPlanResolver.js +11 -0
- package/dist/engine/lib/withGlobalLayerPlan.d.ts +2 -0
- package/dist/engine/lib/withGlobalLayerPlan.js +7 -4
- package/dist/engine/lock.d.ts +4 -0
- package/dist/engine/lock.js +82 -0
- package/dist/envelop.js +5 -4
- package/dist/error.d.ts +18 -49
- package/dist/error.js +50 -39
- package/dist/establishOperationPlan.js +57 -42
- package/dist/execute.d.ts +5 -4
- package/dist/execute.js +31 -15
- package/dist/exportAs.d.ts +1 -18
- package/dist/exportAs.js +2 -3
- package/dist/global.js +2 -3
- package/dist/grafastGraphql.d.ts +6 -1
- package/dist/grafastGraphql.js +35 -16
- package/dist/grafastPrint.d.ts +3 -0
- package/dist/grafastPrint.js +67 -6
- package/dist/graphqlCollectFields.d.ts +7 -34
- package/dist/graphqlCollectFields.js +24 -13
- package/dist/graphqlMergeSelectionSets.js +1 -2
- package/dist/index.d.ts +44 -29
- package/dist/index.js +91 -18
- package/dist/input.d.ts +1 -9
- package/dist/input.js +75 -28
- package/dist/inspect.d.ts +9 -3
- package/dist/inspect.js +3 -3
- package/dist/interfaces.d.ts +238 -93
- package/dist/interfaces.js +20 -3
- package/dist/makeGrafastSchema.d.ts +21 -9
- package/dist/makeGrafastSchema.js +353 -133
- package/dist/mermaid.d.ts +0 -17
- package/dist/mermaid.js +131 -19
- package/dist/middleware.d.ts +7 -0
- package/dist/middleware.js +24 -0
- package/dist/multistep.d.ts +19 -0
- package/dist/multistep.js +54 -0
- package/dist/operationPlan-input.d.ts +5 -4
- package/dist/operationPlan-input.js +140 -368
- package/dist/planJSONInterfaces.d.ts +12 -2
- package/dist/polymorphic.js +4 -5
- package/dist/prepare.d.ts +1 -7
- package/dist/prepare.js +100 -74
- package/dist/step.d.ts +118 -172
- package/dist/step.js +262 -183
- package/dist/steps/__flag.d.ts +65 -0
- package/dist/steps/__flag.js +261 -0
- package/dist/steps/__inputDefault.d.ts +14 -0
- package/dist/steps/__inputDefault.js +48 -0
- package/dist/steps/__inputDynamicScalar.d.ts +4 -6
- package/dist/steps/__inputDynamicScalar.js +4 -2
- package/dist/steps/__inputList.d.ts +5 -9
- package/dist/steps/__inputList.js +4 -1
- package/dist/steps/__inputObject.d.ts +7 -11
- package/dist/steps/__inputObject.js +49 -3
- package/dist/steps/__inputStaticLeaf.d.ts +2 -4
- package/dist/steps/__inputStaticLeaf.js +3 -1
- package/dist/steps/__item.d.ts +10 -12
- package/dist/steps/__item.js +8 -2
- package/dist/steps/__trackedValue.d.ts +7 -55
- package/dist/steps/__trackedValue.js +69 -8
- package/dist/steps/__value.d.ts +5 -4
- package/dist/steps/__value.js +5 -4
- package/dist/steps/access.d.ts +10 -10
- package/dist/steps/access.js +50 -17
- package/dist/steps/applyInput.d.ts +44 -0
- package/dist/steps/applyInput.js +206 -0
- package/dist/steps/applyTransforms.d.ts +2 -25
- package/dist/steps/applyTransforms.js +53 -31
- package/dist/steps/bakedInput.d.ts +23 -0
- package/dist/steps/bakedInput.js +90 -0
- package/dist/steps/condition.d.ts +31 -0
- package/dist/steps/condition.js +94 -0
- package/dist/steps/connection.d.ts +56 -42
- package/dist/steps/connection.js +97 -44
- package/dist/steps/constant.d.ts +7 -7
- package/dist/steps/constant.js +86 -7
- package/dist/steps/each.d.ts +3 -3
- package/dist/steps/each.js +2 -3
- package/dist/steps/error.d.ts +4 -4
- package/dist/steps/error.js +7 -6
- package/dist/steps/filter.d.ts +3 -2
- package/dist/steps/filter.js +1 -2
- package/dist/steps/first.d.ts +10 -9
- package/dist/steps/first.js +9 -13
- package/dist/steps/graphqlResolver.d.ts +3 -76
- package/dist/steps/graphqlResolver.js +89 -72
- package/dist/steps/groupBy.d.ts +3 -2
- package/dist/steps/groupBy.js +1 -2
- package/dist/steps/index.d.ts +12 -3
- package/dist/steps/index.js +48 -6
- package/dist/steps/lambda.d.ts +9 -9
- package/dist/steps/lambda.js +18 -9
- package/dist/steps/last.d.ts +9 -8
- package/dist/steps/last.js +7 -6
- package/dist/steps/list.d.ts +20 -9
- package/dist/steps/list.js +56 -13
- package/dist/steps/listTransform.d.ts +18 -22
- package/dist/steps/listTransform.js +58 -27
- package/dist/steps/listen.d.ts +6 -11
- package/dist/steps/listen.js +14 -16
- package/dist/steps/load.d.ts +42 -33
- package/dist/steps/load.js +60 -27
- package/dist/steps/node.d.ts +17 -10
- package/dist/steps/node.js +18 -6
- package/dist/steps/object.d.ts +33 -27
- package/dist/steps/object.js +53 -32
- package/dist/steps/partitionByIndex.d.ts +3 -2
- package/dist/steps/partitionByIndex.js +1 -2
- package/dist/steps/polymorphicBranch.d.ts +27 -0
- package/dist/steps/polymorphicBranch.js +62 -0
- package/dist/steps/proxy.d.ts +11 -12
- package/dist/steps/proxy.js +8 -5
- package/dist/steps/remapKeys.d.ts +10 -10
- package/dist/steps/remapKeys.js +14 -7
- package/dist/steps/reverse.d.ts +8 -8
- package/dist/steps/reverse.js +10 -7
- package/dist/steps/setter.d.ts +9 -18
- package/dist/steps/setter.js +24 -14
- package/dist/steps/sideEffect.d.ts +28 -0
- package/dist/steps/sideEffect.js +44 -0
- package/dist/stringifyPayload.js +1 -2
- package/dist/stripAnsi.js +2 -2
- package/dist/subscribe.d.ts +7 -1
- package/dist/subscribe.js +24 -9
- package/dist/thereCanBeOnlyOne.js +1 -1
- package/dist/timeSource.d.ts +0 -1
- package/dist/utils.d.ts +56 -55
- package/dist/utils.js +179 -59
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +5 -8
package/dist/index.d.ts
CHANGED
|
@@ -1,28 +1,35 @@
|
|
|
1
1
|
import "./thereCanBeOnlyOne.js";
|
|
2
2
|
import type LRU from "@graphile/lru";
|
|
3
|
-
import type {
|
|
4
|
-
import type { DocumentNode,
|
|
3
|
+
import type { MiddlewareHandlers } from "graphile-config";
|
|
4
|
+
import type { DocumentNode, GraphQLError, OperationDefinitionNode } from "graphql";
|
|
5
|
+
import type { DataFromObjectSteps } from "./steps/object.js";
|
|
5
6
|
type PromiseOrValue<T> = T | Promise<T>;
|
|
6
7
|
import { exportAs, exportAsMany } from "./exportAs.js";
|
|
7
8
|
import { grafastPrint } from "./grafastPrint.js";
|
|
8
9
|
import { EnumPlans, FieldPlans, GrafastPlans, InputObjectPlans, InterfaceOrUnionPlans, makeGrafastSchema, ObjectPlans, ScalarPlans } from "./makeGrafastSchema.js";
|
|
9
10
|
import { defer, Deferred } from "./deferred.js";
|
|
10
11
|
import { isDev, noop } from "./dev.js";
|
|
12
|
+
import { defaultPlanResolver } from "./engine/lib/defaultPlanResolver.js";
|
|
13
|
+
import { isUnaryStep } from "./engine/lib/withGlobalLayerPlan.js";
|
|
11
14
|
import { OperationPlan } from "./engine/OperationPlan.js";
|
|
12
|
-
import {
|
|
15
|
+
import { $$inhibit, flagError, isSafeError, SafeError } from "./error.js";
|
|
13
16
|
import { execute } from "./execute.js";
|
|
14
17
|
import { grafast, grafastSync } from "./grafastGraphql.js";
|
|
15
|
-
import type { $$cacheByOperation, $$hooked, $$queryCache, CacheByOperationEntry, GrafastTimeouts, ScalarInputPlanResolver } from "./interfaces.js";
|
|
16
|
-
import { $$bypassGraphQL, $$eventEmitter, $$extensions, $$idempotent, $$verbatim,
|
|
18
|
+
import type { $$cacheByOperation, $$hooked, $$queryCache, ArgumentApplyPlanResolver, BatchExecutionValue, CacheByOperationEntry, DataFromStep, EnumValueApplyResolver, EstablishOperationPlanEvent, ExecuteEvent, ExecuteStepEvent, ExecutionValue, GrafastExecutionArgs, GrafastTimeouts, InputObjectFieldApplyResolver, InputObjectTypeBakedInfo, InputObjectTypeBakedResolver, ParseAndValidateEvent, PrepareArgsEvent, ScalarInputPlanResolver, UnaryExecutionValue, ValidateSchemaEvent } from "./interfaces.js";
|
|
19
|
+
import { $$bypassGraphQL, $$eventEmitter, $$extensions, $$idempotent, $$verbatim, BaseEventMap, BaseGraphQLArguments, BaseGraphQLRootValue, BaseGraphQLVariables, EventCallback, EventMapKey, ExecutionDetails, ExecutionDetailsStream, ExecutionEventEmitter, ExecutionEventMap, ExecutionExtra, ExecutionResults, ExecutionResultValue, FieldArg, FieldArgs, FieldInfo, FieldPlanResolver, GrafastArgumentConfig, GrafastFieldConfig, GrafastFieldConfigArgumentMap, GrafastInputFieldConfig, GrafastPlanJSON, GrafastResultsList, GrafastResultStreamList, GrafastSubscriber, GrafastValuesList, JSONArray, JSONObject, JSONValue, Maybe, NodeIdCodec, NodeIdHandler, OutputPlanForType, PolymorphicData, PromiseOrDirect, ScalarPlanResolver, StepOptimizeOptions, StepStreamOptions, TypedEventEmitter, UnbatchedExecutionExtra } from "./interfaces.js";
|
|
20
|
+
import { getGrafastMiddleware } from "./middleware.js";
|
|
21
|
+
import type { Multistep, UnwrapMultistep } from "./multistep.js";
|
|
22
|
+
import { multistep } from "./multistep.js";
|
|
23
|
+
import { getNullableInputTypeAtPath } from "./operationPlan-input.js";
|
|
17
24
|
import { polymorphicWrap } from "./polymorphic.js";
|
|
18
|
-
import { assertExecutableStep, assertListCapableStep,
|
|
19
|
-
import { __InputListStep, __InputObjectStep, __InputObjectStepWithDollars, __InputStaticLeafStep, __ItemStep, __ListTransformStep, __TrackedValueStep, __TrackedValueStepWithDollars, __ValueStep, access, AccessStep, ActualKeyByDesiredKey, applyTransforms, ApplyTransformsStep, assertEdgeCapableStep, assertPageInfoCapableStep, connection, ConnectionCapableStep, ConnectionStep, constant, ConstantStep, context, debugPlans, each, EdgeCapableStep, EdgeStep, error, ErrorStep, filter, FilterPlanMemo, first, FirstStep, GraphQLItemHandler, graphqlItemHandler, graphqlResolver, GraphQLResolverStep, groupBy, GroupByPlanMemo, lambda, LambdaStep, last, LastStep, list, listen, ListenStep, ListStep, listTransform, ListTransformItemPlanCallback, ListTransformOptions, ListTransformReduce, LoadedRecordStep, loadMany, LoadManyCallback, loadManyCallback, loadOne, LoadOneCallback, loadOneCallback, LoadOptions, LoadStep, makeDecodeNodeId, node, NodeStep, object, ObjectPlanMeta, ObjectStep, operationPlan, PageInfoCapableStep, partitionByIndex, proxy, ProxyStep, remapKeys, RemapKeysStep, reverse, reverseArray, ReverseStep, setter,
|
|
25
|
+
import { assertExecutableStep, assertListCapableStep, assertStep, isExecutableStep, isListCapableStep, isListLikeStep, isObjectLikeStep, isStep, ListCapableStep, ListLikeStep, ObjectLikeStep, PolymorphicStep, Step, UnbatchedStep } from "./step.js";
|
|
26
|
+
import { __FlagStep, __InputListStep, __InputObjectStep, __InputObjectStepWithDollars, __InputStaticLeafStep, __ItemStep, __ListTransformStep, __TrackedValueStep, __TrackedValueStepWithDollars, __ValueStep, access, AccessStep, ActualKeyByDesiredKey, applyInput, ApplyInputStep, applyTransforms, ApplyTransformsStep, assertEdgeCapableStep, assertModifier, assertNotNull, assertPageInfoCapableStep, bakedInput, bakedInputRuntime, BakedInputStep, condition, ConditionStep, connection, ConnectionCapableStep, ConnectionStep, constant, ConstantStep, context, createObjectAndApplyChildren, debugPlans, each, EdgeCapableStep, EdgeStep, error, ErrorStep, filter, FilterPlanMemo, first, FirstStep, GraphQLItemHandler, graphqlItemHandler, graphqlResolver, GraphQLResolverStep, groupBy, GroupByPlanMemo, inhibitOnNull, isModifier, lambda, LambdaStep, last, LastStep, list, listen, ListenStep, ListStep, listTransform, ListTransformItemPlanCallback, ListTransformOptions, ListTransformReduce, LoadedRecordStep, loadMany, LoadManyCallback, loadManyCallback, loadOne, LoadOneCallback, loadOneCallback, LoadOptions, LoadStep, makeDecodeNodeId, makeDecodeNodeIdRuntime, Modifier, node, nodeIdFromNode, NodeStep, object, ObjectPlanMeta, ObjectStep, operationPlan, PageInfoCapableStep, partitionByIndex, polymorphicBranch, PolymorphicBranchMatcher, PolymorphicBranchMatchers, PolymorphicBranchStep, proxy, ProxyStep, remapKeys, RemapKeysStep, reverse, reverseArray, ReverseStep, rootValue, Setter, setter, SetterCapable, sideEffect, SideEffectStep, specFromNodeId, trackedContext, trackedRootValue, trap, TRAP_ERROR, TRAP_ERROR_OR_INHIBITED, TRAP_INHIBITED } from "./steps/index.js";
|
|
20
27
|
import { stringifyPayload } from "./stringifyPayload.js";
|
|
21
28
|
import { stripAnsi } from "./stripAnsi.js";
|
|
22
29
|
import { subscribe } from "./subscribe.js";
|
|
23
|
-
import { arrayOfLength, arraysMatch, getEnumValueConfig, GrafastInputFieldConfigMap, GrafastInputObjectType, GrafastObjectType, inputObjectFieldSpec, InputObjectTypeSpec, isPromiseLike, newGrafastFieldConfigBuilder, newInputObjectTypeBuilder, newObjectTypeBuilder, objectFieldSpec, objectSpec, ObjectTypeFields, ObjectTypeSpec, stepADependsOnStepB, stepAMayDependOnStepB, stepsAreInSamePhase } from "./utils.js";
|
|
30
|
+
import { arrayOfLength, arraysMatch, getEnumValueConfig, getEnumValueConfigs, GrafastInputFieldConfigMap, GrafastInputObjectType, GrafastObjectType, inputObjectFieldSpec, InputObjectTypeSpec, isPromiseLike, newGrafastFieldConfigBuilder, newInputObjectTypeBuilder, newObjectTypeBuilder, objectFieldSpec, objectSpec, ObjectTypeFields, ObjectTypeSpec, stepADependsOnStepB, stepAMayDependOnStepB, stepsAreInSamePhase } from "./utils.js";
|
|
24
31
|
export { isAsyncIterable } from "iterall";
|
|
25
|
-
export { __InputListStep, __InputObjectStep, __InputObjectStepWithDollars, __InputStaticLeafStep, __ItemStep, __ListTransformStep, __TrackedValueStep, __TrackedValueStepWithDollars, __ValueStep, $$bypassGraphQL, $$eventEmitter, $$extensions, $$idempotent, $$verbatim, access, AccessStep, ActualKeyByDesiredKey,
|
|
32
|
+
export { __FlagStep, __InputListStep, __InputObjectStep, __InputObjectStepWithDollars, __InputStaticLeafStep, __ItemStep, __ListTransformStep, __TrackedValueStep, __TrackedValueStepWithDollars, __ValueStep, $$bypassGraphQL, $$eventEmitter, $$extensions, $$idempotent, $$inhibit, $$verbatim, access, AccessStep, ActualKeyByDesiredKey, applyInput, ApplyInputStep, applyTransforms, ApplyTransformsStep, arrayOfLength, arraysMatch, assertEdgeCapableStep, assertExecutableStep, assertListCapableStep, assertModifier, assertNotNull, assertPageInfoCapableStep, assertStep, bakedInput, bakedInputRuntime, BakedInputStep, BaseEventMap, BaseGraphQLArguments, BaseGraphQLRootValue, BaseGraphQLVariables, BatchExecutionValue, condition, ConditionStep, connection, ConnectionCapableStep, ConnectionStep, constant, ConstantStep, context, createObjectAndApplyChildren, DataFromObjectSteps, DataFromStep, debugPlans, defaultPlanResolver, defer, Deferred, each, EdgeCapableStep, EdgeStep, EnumPlans, error, ErrorStep, EventCallback, EventMapKey, Step as ExecutableStep, execute, ExecutionDetails, ExecutionDetailsStream, ExecutionEventEmitter, ExecutionEventMap, ExecutionExtra, ExecutionResults, ExecutionResultValue, ExecutionValue, exportAs, exportAsMany, FieldArg, FieldArgs, FieldInfo, FieldPlanResolver, FieldPlans, filter, FilterPlanMemo, first, FirstStep, flagError, getEnumValueConfig, getEnumValueConfigs, getGrafastMiddleware, getNullableInputTypeAtPath, grafast, GrafastArgumentConfig, GrafastExecutionArgs, GrafastFieldConfig, GrafastFieldConfigArgumentMap, grafast as grafastGraphql, grafastSync as grafastGraphqlSync, GrafastInputFieldConfig, GrafastInputFieldConfigMap, GrafastInputObjectType, GrafastObjectType, GrafastPlanJSON, GrafastPlans, grafastPrint, GrafastResultsList, GrafastResultStreamList, GrafastSubscriber, grafastSync, GrafastValuesList, GraphQLItemHandler, graphqlItemHandler, graphqlResolver, GraphQLResolverStep, groupBy, GroupByPlanMemo, inhibitOnNull, InputObjectFieldApplyResolver, inputObjectFieldSpec, InputObjectPlans, InputObjectTypeBakedInfo, InputObjectTypeBakedResolver, InputObjectTypeSpec, InterfaceOrUnionPlans, isDev, isExecutableStep, isListCapableStep, isListLikeStep, isModifier, isObjectLikeStep, isPromiseLike, isSafeError, isStep, isUnaryStep, JSONArray, JSONObject, JSONValue, lambda, LambdaStep, last, LastStep, list, ListCapableStep, listen, ListenStep, ListLikeStep, ListStep, listTransform, ListTransformItemPlanCallback, ListTransformOptions, ListTransformReduce, LoadedRecordStep, loadMany, LoadManyCallback, loadManyCallback, loadOne, LoadOneCallback, loadOneCallback, LoadOptions, LoadStep, makeDecodeNodeId, makeDecodeNodeIdRuntime, makeGrafastSchema, Maybe, Modifier, Multistep, multistep, newGrafastFieldConfigBuilder, newInputObjectTypeBuilder, newObjectTypeBuilder, node, NodeIdCodec, nodeIdFromNode, NodeIdHandler, NodeStep, noop, object, objectFieldSpec, ObjectLikeStep, ObjectPlanMeta, ObjectPlans, objectSpec, ObjectStep, ObjectTypeFields, ObjectTypeSpec, OperationPlan, operationPlan, OutputPlanForType, PageInfoCapableStep, partitionByIndex, polymorphicBranch, PolymorphicBranchMatcher, PolymorphicBranchMatchers, PolymorphicBranchStep, PolymorphicData, PolymorphicStep, polymorphicWrap, PromiseOrDirect, proxy, ProxyStep, remapKeys, RemapKeysStep, reverse, reverseArray, ReverseStep, rootValue, SafeError, ScalarPlanResolver, ScalarPlans, Setter, setter, SetterCapable, sideEffect, SideEffectStep, specFromNodeId, Step, stepADependsOnStepB, stepAMayDependOnStepB, StepOptimizeOptions, stepsAreInSamePhase, StepStreamOptions, stringifyPayload, stripAnsi, subscribe, trackedContext, trackedRootValue, trap, TRAP_ERROR, TRAP_ERROR_OR_INHIBITED, TRAP_INHIBITED, TypedEventEmitter, UnaryExecutionValue, UnbatchedStep as UnbatchedExecutableStep, UnbatchedExecutionExtra, UnbatchedStep, UnwrapMultistep, };
|
|
26
33
|
export { hookArgs } from "./args.js";
|
|
27
34
|
export { version } from "./version.js";
|
|
28
35
|
/** @deprecated Renamed to 'applyTransforms' */
|
|
@@ -31,7 +38,7 @@ export declare const deepEval: typeof applyTransforms;
|
|
|
31
38
|
export declare const DeepEvalStep: typeof ApplyTransformsStep;
|
|
32
39
|
declare global {
|
|
33
40
|
namespace Grafast {
|
|
34
|
-
type ExecutionArgs = Pick<
|
|
41
|
+
type ExecutionArgs = Pick<GrafastExecutionArgs, "schema" | "document" | "rootValue" | "variableValues" | "operationName" | "resolvedPreset" | "middleware" | "requestContext" | "outputDataAsString"> & {
|
|
35
42
|
[$$hooked]?: boolean;
|
|
36
43
|
contextValue: Grafast.Context;
|
|
37
44
|
};
|
|
@@ -54,23 +61,25 @@ declare global {
|
|
|
54
61
|
subscribePlan?: FieldPlanResolver<any, any, any>;
|
|
55
62
|
}
|
|
56
63
|
interface ArgumentExtensions {
|
|
57
|
-
inputPlan?: ArgumentInputPlanResolver;
|
|
58
64
|
applyPlan?: ArgumentApplyPlanResolver;
|
|
59
|
-
|
|
60
|
-
|
|
65
|
+
applySubscribePlan?: ArgumentApplyPlanResolver;
|
|
66
|
+
inputPlan?: never;
|
|
67
|
+
autoApplyAfterParentPlan?: never;
|
|
68
|
+
autoApplyAfterParentSubscribePlan?: never;
|
|
61
69
|
}
|
|
62
70
|
interface InputObjectTypeExtensions {
|
|
63
|
-
|
|
71
|
+
baked?: InputObjectTypeBakedResolver;
|
|
64
72
|
}
|
|
65
73
|
interface InputFieldExtensions {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
74
|
+
apply?: InputObjectFieldApplyResolver<any>;
|
|
75
|
+
inputPlan?: never;
|
|
76
|
+
applyPlan?: never;
|
|
77
|
+
autoApplyAfterParentInputPlan?: never;
|
|
78
|
+
autoApplyAfterParentApplyPlan?: never;
|
|
70
79
|
}
|
|
71
80
|
interface ObjectTypeExtensions {
|
|
72
|
-
assertStep?: ((step:
|
|
73
|
-
new (...args: any[]):
|
|
81
|
+
assertStep?: ((step: Step) => asserts step is Step) | {
|
|
82
|
+
new (...args: any[]): Step;
|
|
74
83
|
} | null;
|
|
75
84
|
}
|
|
76
85
|
interface EnumTypeExtensions {
|
|
@@ -79,9 +88,10 @@ declare global {
|
|
|
79
88
|
/**
|
|
80
89
|
* EXPERIMENTAL!
|
|
81
90
|
*
|
|
82
|
-
* @
|
|
91
|
+
* @experimental
|
|
83
92
|
*/
|
|
84
|
-
|
|
93
|
+
apply?: EnumValueApplyResolver<any>;
|
|
94
|
+
applyPlan?: never;
|
|
85
95
|
}
|
|
86
96
|
interface ScalarTypeExtensions {
|
|
87
97
|
plan?: ScalarPlanResolver;
|
|
@@ -140,16 +150,21 @@ declare global {
|
|
|
140
150
|
*/
|
|
141
151
|
grafast?: GraphileConfig.GrafastOptions;
|
|
142
152
|
}
|
|
143
|
-
interface
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
153
|
+
interface GrafastMiddleware {
|
|
154
|
+
/** Synchronous! */
|
|
155
|
+
validateSchema(event: ValidateSchemaEvent): readonly GraphQLError[];
|
|
156
|
+
/** Synchronous! */
|
|
157
|
+
parseAndValidate(event: ParseAndValidateEvent): DocumentNode | readonly GraphQLError[];
|
|
158
|
+
prepareArgs(event: PrepareArgsEvent): PromiseOrDirect<Grafast.ExecutionArgs>;
|
|
159
|
+
execute(event: ExecuteEvent): ReturnType<typeof execute>;
|
|
160
|
+
subscribe(event: ExecuteEvent): ReturnType<typeof subscribe>;
|
|
161
|
+
/** Synchronous! */
|
|
162
|
+
establishOperationPlan(event: EstablishOperationPlanEvent): OperationPlan;
|
|
163
|
+
executeStep(event: ExecuteStepEvent): PromiseOrDirect<GrafastResultsList<any>>;
|
|
149
164
|
}
|
|
150
165
|
interface Plugin {
|
|
151
166
|
grafast?: {
|
|
152
|
-
|
|
167
|
+
middleware?: MiddlewareHandlers<GrafastMiddleware>;
|
|
153
168
|
};
|
|
154
169
|
}
|
|
155
170
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.
|
|
3
|
+
exports.execute = exports.ExecutableStep = exports.ErrorStep = exports.error = exports.EdgeStep = exports.each = exports.defer = exports.defaultPlanResolver = exports.debugPlans = exports.createObjectAndApplyChildren = exports.context = exports.ConstantStep = exports.constant = exports.ConnectionStep = exports.connection = exports.ConditionStep = exports.condition = exports.BakedInputStep = exports.bakedInputRuntime = exports.bakedInput = exports.assertStep = exports.assertPageInfoCapableStep = exports.assertNotNull = exports.assertModifier = exports.assertListCapableStep = exports.assertExecutableStep = exports.assertEdgeCapableStep = exports.arraysMatch = exports.arrayOfLength = exports.ApplyTransformsStep = exports.applyTransforms = exports.ApplyInputStep = exports.applyInput = exports.AccessStep = exports.access = exports.$$verbatim = exports.$$inhibit = exports.$$idempotent = exports.$$extensions = exports.$$eventEmitter = exports.$$bypassGraphQL = exports.__ValueStep = exports.__TrackedValueStep = exports.__ListTransformStep = exports.__ItemStep = exports.__InputStaticLeafStep = exports.__InputObjectStep = exports.__InputListStep = exports.__FlagStep = exports.isAsyncIterable = void 0;
|
|
4
|
+
exports.makeGrafastSchema = exports.makeDecodeNodeIdRuntime = exports.makeDecodeNodeId = exports.LoadStep = exports.loadOneCallback = exports.loadOne = exports.loadManyCallback = exports.loadMany = exports.LoadedRecordStep = exports.listTransform = exports.ListStep = exports.ListenStep = exports.listen = exports.list = exports.LastStep = exports.last = exports.LambdaStep = exports.lambda = exports.isUnaryStep = exports.isStep = exports.isSafeError = exports.isPromiseLike = exports.isObjectLikeStep = exports.isModifier = exports.isListLikeStep = exports.isListCapableStep = exports.isExecutableStep = exports.isDev = exports.inputObjectFieldSpec = exports.inhibitOnNull = exports.groupBy = exports.GraphQLResolverStep = exports.graphqlResolver = exports.graphqlItemHandler = exports.GraphQLItemHandler = exports.grafastSync = exports.grafastPrint = exports.grafastGraphqlSync = exports.grafastGraphql = exports.grafast = exports.getNullableInputTypeAtPath = exports.getGrafastMiddleware = exports.getEnumValueConfigs = exports.getEnumValueConfig = exports.flagError = exports.FirstStep = exports.first = exports.filter = exports.exportAsMany = exports.exportAs = void 0;
|
|
5
|
+
exports.version = exports.hookArgs = exports.UnbatchedStep = exports.UnbatchedExecutableStep = exports.TRAP_INHIBITED = exports.TRAP_ERROR_OR_INHIBITED = exports.TRAP_ERROR = exports.trap = exports.trackedRootValue = exports.trackedContext = exports.subscribe = exports.stripAnsi = exports.stringifyPayload = exports.stepsAreInSamePhase = exports.stepAMayDependOnStepB = exports.stepADependsOnStepB = exports.Step = exports.specFromNodeId = exports.SideEffectStep = exports.sideEffect = exports.setter = exports.Setter = exports.SafeError = exports.rootValue = exports.ReverseStep = exports.reverseArray = exports.reverse = exports.RemapKeysStep = exports.remapKeys = exports.ProxyStep = exports.proxy = exports.polymorphicWrap = exports.PolymorphicBranchStep = exports.polymorphicBranch = exports.partitionByIndex = exports.operationPlan = exports.OperationPlan = exports.ObjectStep = exports.objectSpec = exports.objectFieldSpec = exports.object = exports.noop = exports.NodeStep = exports.nodeIdFromNode = exports.node = exports.newObjectTypeBuilder = exports.newInputObjectTypeBuilder = exports.newGrafastFieldConfigBuilder = exports.multistep = exports.Modifier = void 0;
|
|
6
|
+
exports.DeepEvalStep = exports.deepEval = void 0;
|
|
6
7
|
const tslib_1 = require("tslib");
|
|
7
8
|
require("./thereCanBeOnlyOne.js");
|
|
8
9
|
const debug_1 = tslib_1.__importDefault(require("debug"));
|
|
@@ -21,10 +22,15 @@ Object.defineProperty(exports, "defer", { enumerable: true, get: function () { r
|
|
|
21
22
|
const dev_js_1 = require("./dev.js");
|
|
22
23
|
Object.defineProperty(exports, "isDev", { enumerable: true, get: function () { return dev_js_1.isDev; } });
|
|
23
24
|
Object.defineProperty(exports, "noop", { enumerable: true, get: function () { return dev_js_1.noop; } });
|
|
25
|
+
const defaultPlanResolver_js_1 = require("./engine/lib/defaultPlanResolver.js");
|
|
26
|
+
Object.defineProperty(exports, "defaultPlanResolver", { enumerable: true, get: function () { return defaultPlanResolver_js_1.defaultPlanResolver; } });
|
|
27
|
+
const withGlobalLayerPlan_js_1 = require("./engine/lib/withGlobalLayerPlan.js");
|
|
28
|
+
Object.defineProperty(exports, "isUnaryStep", { enumerable: true, get: function () { return withGlobalLayerPlan_js_1.isUnaryStep; } });
|
|
24
29
|
const OperationPlan_js_1 = require("./engine/OperationPlan.js");
|
|
25
30
|
Object.defineProperty(exports, "OperationPlan", { enumerable: true, get: function () { return OperationPlan_js_1.OperationPlan; } });
|
|
26
31
|
const error_js_1 = require("./error.js");
|
|
27
|
-
Object.defineProperty(exports, "
|
|
32
|
+
Object.defineProperty(exports, "$$inhibit", { enumerable: true, get: function () { return error_js_1.$$inhibit; } });
|
|
33
|
+
Object.defineProperty(exports, "flagError", { enumerable: true, get: function () { return error_js_1.flagError; } });
|
|
28
34
|
Object.defineProperty(exports, "isSafeError", { enumerable: true, get: function () { return error_js_1.isSafeError; } });
|
|
29
35
|
Object.defineProperty(exports, "SafeError", { enumerable: true, get: function () { return error_js_1.SafeError; } });
|
|
30
36
|
const execute_js_1 = require("./execute.js");
|
|
@@ -40,23 +46,29 @@ Object.defineProperty(exports, "$$eventEmitter", { enumerable: true, get: functi
|
|
|
40
46
|
Object.defineProperty(exports, "$$extensions", { enumerable: true, get: function () { return interfaces_js_1.$$extensions; } });
|
|
41
47
|
Object.defineProperty(exports, "$$idempotent", { enumerable: true, get: function () { return interfaces_js_1.$$idempotent; } });
|
|
42
48
|
Object.defineProperty(exports, "$$verbatim", { enumerable: true, get: function () { return interfaces_js_1.$$verbatim; } });
|
|
49
|
+
const middleware_js_1 = require("./middleware.js");
|
|
50
|
+
Object.defineProperty(exports, "getGrafastMiddleware", { enumerable: true, get: function () { return middleware_js_1.getGrafastMiddleware; } });
|
|
51
|
+
const multistep_js_1 = require("./multistep.js");
|
|
52
|
+
Object.defineProperty(exports, "multistep", { enumerable: true, get: function () { return multistep_js_1.multistep; } });
|
|
53
|
+
const operationPlan_input_js_1 = require("./operationPlan-input.js");
|
|
54
|
+
Object.defineProperty(exports, "getNullableInputTypeAtPath", { enumerable: true, get: function () { return operationPlan_input_js_1.getNullableInputTypeAtPath; } });
|
|
43
55
|
const polymorphic_js_1 = require("./polymorphic.js");
|
|
44
56
|
Object.defineProperty(exports, "polymorphicWrap", { enumerable: true, get: function () { return polymorphic_js_1.polymorphicWrap; } });
|
|
45
57
|
const step_js_1 = require("./step.js");
|
|
46
58
|
Object.defineProperty(exports, "assertExecutableStep", { enumerable: true, get: function () { return step_js_1.assertExecutableStep; } });
|
|
47
59
|
Object.defineProperty(exports, "assertListCapableStep", { enumerable: true, get: function () { return step_js_1.assertListCapableStep; } });
|
|
48
|
-
Object.defineProperty(exports, "
|
|
49
|
-
Object.defineProperty(exports, "BaseStep", { enumerable: true, get: function () { return step_js_1.BaseStep; } });
|
|
50
|
-
Object.defineProperty(exports, "ExecutableStep", { enumerable: true, get: function () { return step_js_1.ExecutableStep; } });
|
|
60
|
+
Object.defineProperty(exports, "assertStep", { enumerable: true, get: function () { return step_js_1.assertStep; } });
|
|
51
61
|
Object.defineProperty(exports, "isExecutableStep", { enumerable: true, get: function () { return step_js_1.isExecutableStep; } });
|
|
52
62
|
Object.defineProperty(exports, "isListCapableStep", { enumerable: true, get: function () { return step_js_1.isListCapableStep; } });
|
|
53
63
|
Object.defineProperty(exports, "isListLikeStep", { enumerable: true, get: function () { return step_js_1.isListLikeStep; } });
|
|
54
|
-
Object.defineProperty(exports, "isModifierStep", { enumerable: true, get: function () { return step_js_1.isModifierStep; } });
|
|
55
64
|
Object.defineProperty(exports, "isObjectLikeStep", { enumerable: true, get: function () { return step_js_1.isObjectLikeStep; } });
|
|
56
|
-
Object.defineProperty(exports, "
|
|
57
|
-
Object.defineProperty(exports, "
|
|
58
|
-
Object.defineProperty(exports, "
|
|
65
|
+
Object.defineProperty(exports, "isStep", { enumerable: true, get: function () { return step_js_1.isStep; } });
|
|
66
|
+
Object.defineProperty(exports, "ExecutableStep", { enumerable: true, get: function () { return step_js_1.Step; } });
|
|
67
|
+
Object.defineProperty(exports, "Step", { enumerable: true, get: function () { return step_js_1.Step; } });
|
|
68
|
+
Object.defineProperty(exports, "UnbatchedExecutableStep", { enumerable: true, get: function () { return step_js_1.UnbatchedStep; } });
|
|
69
|
+
Object.defineProperty(exports, "UnbatchedStep", { enumerable: true, get: function () { return step_js_1.UnbatchedStep; } });
|
|
59
70
|
const index_js_1 = require("./steps/index.js");
|
|
71
|
+
Object.defineProperty(exports, "__FlagStep", { enumerable: true, get: function () { return index_js_1.__FlagStep; } });
|
|
60
72
|
Object.defineProperty(exports, "__InputListStep", { enumerable: true, get: function () { return index_js_1.__InputListStep; } });
|
|
61
73
|
Object.defineProperty(exports, "__InputObjectStep", { enumerable: true, get: function () { return index_js_1.__InputObjectStep; } });
|
|
62
74
|
Object.defineProperty(exports, "__InputStaticLeafStep", { enumerable: true, get: function () { return index_js_1.__InputStaticLeafStep; } });
|
|
@@ -66,15 +78,25 @@ Object.defineProperty(exports, "__TrackedValueStep", { enumerable: true, get: fu
|
|
|
66
78
|
Object.defineProperty(exports, "__ValueStep", { enumerable: true, get: function () { return index_js_1.__ValueStep; } });
|
|
67
79
|
Object.defineProperty(exports, "access", { enumerable: true, get: function () { return index_js_1.access; } });
|
|
68
80
|
Object.defineProperty(exports, "AccessStep", { enumerable: true, get: function () { return index_js_1.AccessStep; } });
|
|
81
|
+
Object.defineProperty(exports, "applyInput", { enumerable: true, get: function () { return index_js_1.applyInput; } });
|
|
82
|
+
Object.defineProperty(exports, "ApplyInputStep", { enumerable: true, get: function () { return index_js_1.ApplyInputStep; } });
|
|
69
83
|
Object.defineProperty(exports, "applyTransforms", { enumerable: true, get: function () { return index_js_1.applyTransforms; } });
|
|
70
84
|
Object.defineProperty(exports, "ApplyTransformsStep", { enumerable: true, get: function () { return index_js_1.ApplyTransformsStep; } });
|
|
71
85
|
Object.defineProperty(exports, "assertEdgeCapableStep", { enumerable: true, get: function () { return index_js_1.assertEdgeCapableStep; } });
|
|
86
|
+
Object.defineProperty(exports, "assertModifier", { enumerable: true, get: function () { return index_js_1.assertModifier; } });
|
|
87
|
+
Object.defineProperty(exports, "assertNotNull", { enumerable: true, get: function () { return index_js_1.assertNotNull; } });
|
|
72
88
|
Object.defineProperty(exports, "assertPageInfoCapableStep", { enumerable: true, get: function () { return index_js_1.assertPageInfoCapableStep; } });
|
|
89
|
+
Object.defineProperty(exports, "bakedInput", { enumerable: true, get: function () { return index_js_1.bakedInput; } });
|
|
90
|
+
Object.defineProperty(exports, "bakedInputRuntime", { enumerable: true, get: function () { return index_js_1.bakedInputRuntime; } });
|
|
91
|
+
Object.defineProperty(exports, "BakedInputStep", { enumerable: true, get: function () { return index_js_1.BakedInputStep; } });
|
|
92
|
+
Object.defineProperty(exports, "condition", { enumerable: true, get: function () { return index_js_1.condition; } });
|
|
93
|
+
Object.defineProperty(exports, "ConditionStep", { enumerable: true, get: function () { return index_js_1.ConditionStep; } });
|
|
73
94
|
Object.defineProperty(exports, "connection", { enumerable: true, get: function () { return index_js_1.connection; } });
|
|
74
95
|
Object.defineProperty(exports, "ConnectionStep", { enumerable: true, get: function () { return index_js_1.ConnectionStep; } });
|
|
75
96
|
Object.defineProperty(exports, "constant", { enumerable: true, get: function () { return index_js_1.constant; } });
|
|
76
97
|
Object.defineProperty(exports, "ConstantStep", { enumerable: true, get: function () { return index_js_1.ConstantStep; } });
|
|
77
98
|
Object.defineProperty(exports, "context", { enumerable: true, get: function () { return index_js_1.context; } });
|
|
99
|
+
Object.defineProperty(exports, "createObjectAndApplyChildren", { enumerable: true, get: function () { return index_js_1.createObjectAndApplyChildren; } });
|
|
78
100
|
Object.defineProperty(exports, "debugPlans", { enumerable: true, get: function () { return index_js_1.debugPlans; } });
|
|
79
101
|
Object.defineProperty(exports, "each", { enumerable: true, get: function () { return index_js_1.each; } });
|
|
80
102
|
Object.defineProperty(exports, "EdgeStep", { enumerable: true, get: function () { return index_js_1.EdgeStep; } });
|
|
@@ -88,6 +110,8 @@ Object.defineProperty(exports, "graphqlItemHandler", { enumerable: true, get: fu
|
|
|
88
110
|
Object.defineProperty(exports, "graphqlResolver", { enumerable: true, get: function () { return index_js_1.graphqlResolver; } });
|
|
89
111
|
Object.defineProperty(exports, "GraphQLResolverStep", { enumerable: true, get: function () { return index_js_1.GraphQLResolverStep; } });
|
|
90
112
|
Object.defineProperty(exports, "groupBy", { enumerable: true, get: function () { return index_js_1.groupBy; } });
|
|
113
|
+
Object.defineProperty(exports, "inhibitOnNull", { enumerable: true, get: function () { return index_js_1.inhibitOnNull; } });
|
|
114
|
+
Object.defineProperty(exports, "isModifier", { enumerable: true, get: function () { return index_js_1.isModifier; } });
|
|
91
115
|
Object.defineProperty(exports, "lambda", { enumerable: true, get: function () { return index_js_1.lambda; } });
|
|
92
116
|
Object.defineProperty(exports, "LambdaStep", { enumerable: true, get: function () { return index_js_1.LambdaStep; } });
|
|
93
117
|
Object.defineProperty(exports, "last", { enumerable: true, get: function () { return index_js_1.last; } });
|
|
@@ -104,12 +128,17 @@ Object.defineProperty(exports, "loadOne", { enumerable: true, get: function () {
|
|
|
104
128
|
Object.defineProperty(exports, "loadOneCallback", { enumerable: true, get: function () { return index_js_1.loadOneCallback; } });
|
|
105
129
|
Object.defineProperty(exports, "LoadStep", { enumerable: true, get: function () { return index_js_1.LoadStep; } });
|
|
106
130
|
Object.defineProperty(exports, "makeDecodeNodeId", { enumerable: true, get: function () { return index_js_1.makeDecodeNodeId; } });
|
|
131
|
+
Object.defineProperty(exports, "makeDecodeNodeIdRuntime", { enumerable: true, get: function () { return index_js_1.makeDecodeNodeIdRuntime; } });
|
|
132
|
+
Object.defineProperty(exports, "Modifier", { enumerable: true, get: function () { return index_js_1.Modifier; } });
|
|
107
133
|
Object.defineProperty(exports, "node", { enumerable: true, get: function () { return index_js_1.node; } });
|
|
134
|
+
Object.defineProperty(exports, "nodeIdFromNode", { enumerable: true, get: function () { return index_js_1.nodeIdFromNode; } });
|
|
108
135
|
Object.defineProperty(exports, "NodeStep", { enumerable: true, get: function () { return index_js_1.NodeStep; } });
|
|
109
136
|
Object.defineProperty(exports, "object", { enumerable: true, get: function () { return index_js_1.object; } });
|
|
110
137
|
Object.defineProperty(exports, "ObjectStep", { enumerable: true, get: function () { return index_js_1.ObjectStep; } });
|
|
111
138
|
Object.defineProperty(exports, "operationPlan", { enumerable: true, get: function () { return index_js_1.operationPlan; } });
|
|
112
139
|
Object.defineProperty(exports, "partitionByIndex", { enumerable: true, get: function () { return index_js_1.partitionByIndex; } });
|
|
140
|
+
Object.defineProperty(exports, "polymorphicBranch", { enumerable: true, get: function () { return index_js_1.polymorphicBranch; } });
|
|
141
|
+
Object.defineProperty(exports, "PolymorphicBranchStep", { enumerable: true, get: function () { return index_js_1.PolymorphicBranchStep; } });
|
|
113
142
|
Object.defineProperty(exports, "proxy", { enumerable: true, get: function () { return index_js_1.proxy; } });
|
|
114
143
|
Object.defineProperty(exports, "ProxyStep", { enumerable: true, get: function () { return index_js_1.ProxyStep; } });
|
|
115
144
|
Object.defineProperty(exports, "remapKeys", { enumerable: true, get: function () { return index_js_1.remapKeys; } });
|
|
@@ -117,9 +146,18 @@ Object.defineProperty(exports, "RemapKeysStep", { enumerable: true, get: functio
|
|
|
117
146
|
Object.defineProperty(exports, "reverse", { enumerable: true, get: function () { return index_js_1.reverse; } });
|
|
118
147
|
Object.defineProperty(exports, "reverseArray", { enumerable: true, get: function () { return index_js_1.reverseArray; } });
|
|
119
148
|
Object.defineProperty(exports, "ReverseStep", { enumerable: true, get: function () { return index_js_1.ReverseStep; } });
|
|
149
|
+
Object.defineProperty(exports, "rootValue", { enumerable: true, get: function () { return index_js_1.rootValue; } });
|
|
150
|
+
Object.defineProperty(exports, "Setter", { enumerable: true, get: function () { return index_js_1.Setter; } });
|
|
120
151
|
Object.defineProperty(exports, "setter", { enumerable: true, get: function () { return index_js_1.setter; } });
|
|
121
|
-
Object.defineProperty(exports, "
|
|
152
|
+
Object.defineProperty(exports, "sideEffect", { enumerable: true, get: function () { return index_js_1.sideEffect; } });
|
|
153
|
+
Object.defineProperty(exports, "SideEffectStep", { enumerable: true, get: function () { return index_js_1.SideEffectStep; } });
|
|
122
154
|
Object.defineProperty(exports, "specFromNodeId", { enumerable: true, get: function () { return index_js_1.specFromNodeId; } });
|
|
155
|
+
Object.defineProperty(exports, "trackedContext", { enumerable: true, get: function () { return index_js_1.trackedContext; } });
|
|
156
|
+
Object.defineProperty(exports, "trackedRootValue", { enumerable: true, get: function () { return index_js_1.trackedRootValue; } });
|
|
157
|
+
Object.defineProperty(exports, "trap", { enumerable: true, get: function () { return index_js_1.trap; } });
|
|
158
|
+
Object.defineProperty(exports, "TRAP_ERROR", { enumerable: true, get: function () { return index_js_1.TRAP_ERROR; } });
|
|
159
|
+
Object.defineProperty(exports, "TRAP_ERROR_OR_INHIBITED", { enumerable: true, get: function () { return index_js_1.TRAP_ERROR_OR_INHIBITED; } });
|
|
160
|
+
Object.defineProperty(exports, "TRAP_INHIBITED", { enumerable: true, get: function () { return index_js_1.TRAP_INHIBITED; } });
|
|
123
161
|
const stringifyPayload_js_1 = require("./stringifyPayload.js");
|
|
124
162
|
Object.defineProperty(exports, "stringifyPayload", { enumerable: true, get: function () { return stringifyPayload_js_1.stringifyPayload; } });
|
|
125
163
|
const stripAnsi_js_1 = require("./stripAnsi.js");
|
|
@@ -130,6 +168,7 @@ const utils_js_1 = require("./utils.js");
|
|
|
130
168
|
Object.defineProperty(exports, "arrayOfLength", { enumerable: true, get: function () { return utils_js_1.arrayOfLength; } });
|
|
131
169
|
Object.defineProperty(exports, "arraysMatch", { enumerable: true, get: function () { return utils_js_1.arraysMatch; } });
|
|
132
170
|
Object.defineProperty(exports, "getEnumValueConfig", { enumerable: true, get: function () { return utils_js_1.getEnumValueConfig; } });
|
|
171
|
+
Object.defineProperty(exports, "getEnumValueConfigs", { enumerable: true, get: function () { return utils_js_1.getEnumValueConfigs; } });
|
|
133
172
|
Object.defineProperty(exports, "inputObjectFieldSpec", { enumerable: true, get: function () { return utils_js_1.inputObjectFieldSpec; } });
|
|
134
173
|
Object.defineProperty(exports, "isPromiseLike", { enumerable: true, get: function () { return utils_js_1.isPromiseLike; } });
|
|
135
174
|
Object.defineProperty(exports, "newGrafastFieldConfigBuilder", { enumerable: true, get: function () { return utils_js_1.newGrafastFieldConfigBuilder; } });
|
|
@@ -150,6 +189,8 @@ Object.defineProperty(exports, "isAsyncIterable", { enumerable: true, get: funct
|
|
|
150
189
|
OperationPlan: OperationPlan_js_1.OperationPlan,
|
|
151
190
|
defer: deferred_js_1.defer,
|
|
152
191
|
execute: execute_js_1.execute,
|
|
192
|
+
getNullableInputTypeAtPath: operationPlan_input_js_1.getNullableInputTypeAtPath,
|
|
193
|
+
getGrafastMiddleware: middleware_js_1.getGrafastMiddleware,
|
|
153
194
|
grafast: grafastGraphql_js_1.grafast,
|
|
154
195
|
grafastSync: grafastGraphql_js_1.grafastSync,
|
|
155
196
|
subscribe: subscribe_js_1.subscribe,
|
|
@@ -158,29 +199,46 @@ Object.defineProperty(exports, "isAsyncIterable", { enumerable: true, get: funct
|
|
|
158
199
|
__InputObjectStep: index_js_1.__InputObjectStep,
|
|
159
200
|
__InputStaticLeafStep: index_js_1.__InputStaticLeafStep,
|
|
160
201
|
assertExecutableStep: step_js_1.assertExecutableStep,
|
|
202
|
+
assertStep: step_js_1.assertStep,
|
|
161
203
|
assertListCapableStep: step_js_1.assertListCapableStep,
|
|
162
|
-
|
|
163
|
-
|
|
204
|
+
assertModifier: index_js_1.assertModifier,
|
|
205
|
+
isStep: step_js_1.isStep,
|
|
164
206
|
isListCapableStep: step_js_1.isListCapableStep,
|
|
165
|
-
|
|
207
|
+
isModifier: index_js_1.isModifier,
|
|
166
208
|
isObjectLikeStep: step_js_1.isObjectLikeStep,
|
|
167
209
|
isListLikeStep: step_js_1.isListLikeStep,
|
|
168
|
-
isStreamableStep: step_js_1.isStreamableStep,
|
|
169
210
|
__ItemStep: index_js_1.__ItemStep,
|
|
170
211
|
__ListTransformStep: index_js_1.__ListTransformStep,
|
|
171
212
|
__TrackedValueStep: index_js_1.__TrackedValueStep,
|
|
172
213
|
__ValueStep: index_js_1.__ValueStep,
|
|
173
214
|
access: index_js_1.access,
|
|
174
215
|
AccessStep: index_js_1.AccessStep,
|
|
216
|
+
applyInput: index_js_1.applyInput,
|
|
217
|
+
ApplyInputStep: index_js_1.ApplyInputStep,
|
|
218
|
+
bakedInput: index_js_1.bakedInput,
|
|
219
|
+
bakedInputRuntime: index_js_1.bakedInputRuntime,
|
|
220
|
+
BakedInputStep: index_js_1.BakedInputStep,
|
|
175
221
|
operationPlan: index_js_1.operationPlan,
|
|
176
222
|
connection: index_js_1.connection,
|
|
177
223
|
assertEdgeCapableStep: index_js_1.assertEdgeCapableStep,
|
|
178
224
|
assertPageInfoCapableStep: index_js_1.assertPageInfoCapableStep,
|
|
179
225
|
ConnectionStep: index_js_1.ConnectionStep,
|
|
226
|
+
EdgeStep: index_js_1.EdgeStep,
|
|
227
|
+
condition: index_js_1.condition,
|
|
228
|
+
ConditionStep: index_js_1.ConditionStep,
|
|
180
229
|
constant: index_js_1.constant,
|
|
181
230
|
ConstantStep: index_js_1.ConstantStep,
|
|
182
231
|
context: index_js_1.context,
|
|
183
|
-
|
|
232
|
+
rootValue: index_js_1.rootValue,
|
|
233
|
+
trackedContext: index_js_1.trackedContext,
|
|
234
|
+
trackedRootValue: index_js_1.trackedRootValue,
|
|
235
|
+
inhibitOnNull: index_js_1.inhibitOnNull,
|
|
236
|
+
assertNotNull: index_js_1.assertNotNull,
|
|
237
|
+
trap: index_js_1.trap,
|
|
238
|
+
__FlagStep: index_js_1.__FlagStep,
|
|
239
|
+
TRAP_ERROR: index_js_1.TRAP_ERROR,
|
|
240
|
+
TRAP_ERROR_OR_INHIBITED: index_js_1.TRAP_ERROR_OR_INHIBITED,
|
|
241
|
+
TRAP_INHIBITED: index_js_1.TRAP_INHIBITED,
|
|
184
242
|
debugPlans: index_js_1.debugPlans,
|
|
185
243
|
each: index_js_1.each,
|
|
186
244
|
error: index_js_1.error,
|
|
@@ -192,7 +250,11 @@ Object.defineProperty(exports, "isAsyncIterable", { enumerable: true, get: funct
|
|
|
192
250
|
first: index_js_1.first,
|
|
193
251
|
node: index_js_1.node,
|
|
194
252
|
specFromNodeId: index_js_1.specFromNodeId,
|
|
253
|
+
nodeIdFromNode: index_js_1.nodeIdFromNode,
|
|
254
|
+
polymorphicBranch: index_js_1.polymorphicBranch,
|
|
255
|
+
PolymorphicBranchStep: index_js_1.PolymorphicBranchStep,
|
|
195
256
|
makeDecodeNodeId: index_js_1.makeDecodeNodeId,
|
|
257
|
+
makeDecodeNodeIdRuntime: index_js_1.makeDecodeNodeIdRuntime,
|
|
196
258
|
proxy: index_js_1.proxy,
|
|
197
259
|
applyTransforms: index_js_1.applyTransforms,
|
|
198
260
|
ApplyTransformsStep: index_js_1.ApplyTransformsStep,
|
|
@@ -207,6 +269,8 @@ Object.defineProperty(exports, "isAsyncIterable", { enumerable: true, get: funct
|
|
|
207
269
|
LastStep: index_js_1.LastStep,
|
|
208
270
|
lambda: index_js_1.lambda,
|
|
209
271
|
LambdaStep: index_js_1.LambdaStep,
|
|
272
|
+
sideEffect: index_js_1.sideEffect,
|
|
273
|
+
SideEffectStep: index_js_1.SideEffectStep,
|
|
210
274
|
list: index_js_1.list,
|
|
211
275
|
ListStep: index_js_1.ListStep,
|
|
212
276
|
remapKeys: index_js_1.remapKeys,
|
|
@@ -217,7 +281,8 @@ Object.defineProperty(exports, "isAsyncIterable", { enumerable: true, get: funct
|
|
|
217
281
|
reverseArray: index_js_1.reverseArray,
|
|
218
282
|
ReverseStep: index_js_1.ReverseStep,
|
|
219
283
|
setter: index_js_1.setter,
|
|
220
|
-
|
|
284
|
+
createObjectAndApplyChildren: index_js_1.createObjectAndApplyChildren,
|
|
285
|
+
Setter: index_js_1.Setter,
|
|
221
286
|
listen: index_js_1.listen,
|
|
222
287
|
ListenStep: index_js_1.ListenStep,
|
|
223
288
|
polymorphicWrap: polymorphic_js_1.polymorphicWrap,
|
|
@@ -237,12 +302,20 @@ Object.defineProperty(exports, "isAsyncIterable", { enumerable: true, get: funct
|
|
|
237
302
|
isDev: dev_js_1.isDev,
|
|
238
303
|
noop: dev_js_1.noop,
|
|
239
304
|
getEnumValueConfig: utils_js_1.getEnumValueConfig,
|
|
305
|
+
getEnumValueConfigs: utils_js_1.getEnumValueConfigs,
|
|
240
306
|
loadOne: index_js_1.loadOne,
|
|
241
307
|
loadMany: index_js_1.loadMany,
|
|
242
308
|
loadOneCallback: index_js_1.loadOneCallback,
|
|
243
309
|
loadManyCallback: index_js_1.loadManyCallback,
|
|
244
310
|
LoadedRecordStep: index_js_1.LoadedRecordStep,
|
|
245
311
|
LoadStep: index_js_1.LoadStep,
|
|
312
|
+
isSafeError: error_js_1.isSafeError,
|
|
313
|
+
$$inhibit: error_js_1.$$inhibit,
|
|
314
|
+
flagError: error_js_1.flagError,
|
|
315
|
+
SafeError: error_js_1.SafeError,
|
|
316
|
+
isUnaryStep: withGlobalLayerPlan_js_1.isUnaryStep,
|
|
317
|
+
defaultPlanResolver: defaultPlanResolver_js_1.defaultPlanResolver,
|
|
318
|
+
multistep: multistep_js_1.multistep,
|
|
246
319
|
});
|
|
247
320
|
var args_js_1 = require("./args.js");
|
|
248
321
|
Object.defineProperty(exports, "hookArgs", { enumerable: true, get: function () { return args_js_1.hookArgs; } });
|
package/dist/input.d.ts
CHANGED
|
@@ -1,14 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { GraphQLType, ListTypeNode, NamedTypeNode, NonNullTypeNode } from "graphql";
|
|
2
2
|
import type { OperationPlan } from "./engine/OperationPlan.js";
|
|
3
3
|
import type { AnyInputStep } from "./interfaces.js";
|
|
4
4
|
export declare function assertInputStep(itemPlan: unknown): asserts itemPlan is AnyInputStep;
|
|
5
5
|
export declare function graphqlGetTypeForNode(operationPlan: OperationPlan, node: NamedTypeNode | ListTypeNode | NonNullTypeNode): GraphQLType;
|
|
6
|
-
/**
|
|
7
|
-
* Returns a plan for the given `rawInputValue` AST node which could be a
|
|
8
|
-
* variable or a literal, and could be nested so that a variable (or more than
|
|
9
|
-
* one) appears somewhere. More than one plan may be created.
|
|
10
|
-
*
|
|
11
|
-
* @internal
|
|
12
|
-
*/
|
|
13
|
-
export declare function inputStep(operationPlan: OperationPlan, inputType: GraphQLInputType, rawInputValue: ValueNode | undefined, defaultValue?: ConstValueNode | undefined): AnyInputStep;
|
|
14
6
|
//# sourceMappingURL=input.d.ts.map
|