grafast 0.0.0 → 0.0.1-0.2
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/LICENSE.md +26 -0
- package/README.md +3 -1
- package/dist/LICENSES.txt +273 -0
- package/dist/args.d.ts +3 -0
- package/dist/assert.d.ts +3 -0
- package/dist/bucket.d.ts +24 -0
- package/dist/config.d.ts +9 -0
- package/dist/constraints.d.ts +30 -0
- package/dist/deferred.d.ts +6 -0
- package/dist/dev.d.ts +3 -0
- package/dist/engine/LayerPlan.d.ts +80 -0
- package/dist/engine/OperationPlan.d.ts +120 -0
- package/dist/engine/OutputPlan.d.ts +84 -0
- package/dist/engine/StepTracker.d.ts +35 -0
- package/dist/engine/executeBucket.d.ts +5 -0
- package/dist/engine/executeOutputPlan.d.ts +42 -0
- package/dist/engine/lib/withGlobalLayerPlan.d.ts +5 -0
- package/dist/envelop.d.ts +7 -0
- package/dist/envelop.js +1 -0
- package/dist/error.d.ts +13 -0
- package/dist/establishOperationPlan.d.ts +9 -0
- package/dist/execute.d.ts +5 -0
- package/dist/exportAs.d.ts +5 -0
- package/dist/global.d.ts +3 -0
- package/dist/grafastGraphql.d.ts +5 -0
- package/dist/grafastPrint.d.ts +5 -0
- package/dist/graphqlCollectFields.d.ts +12 -0
- package/dist/graphqlMergeSelectionSets.d.ts +4 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +169 -0
- package/dist/input.d.ts +11 -0
- package/dist/inspect.d.ts +4 -0
- package/dist/interfaces.d.ts +261 -0
- package/dist/makeGrafastSchema.d.ts +52 -0
- package/dist/mermaid.d.ts +15 -0
- package/dist/opPlan-input.d.ts +6 -0
- package/dist/polymorphic.d.ts +6 -0
- package/dist/prepare.d.ts +11 -0
- package/dist/step.d.ts +104 -0
- package/dist/steps/__inputDynamicScalar.d.ts +18 -0
- package/dist/steps/__inputList.d.ts +23 -0
- package/dist/steps/__inputObject.d.ts +24 -0
- package/dist/steps/__inputStaticLeaf.d.ts +15 -0
- package/dist/steps/__item.d.ts +19 -0
- package/dist/steps/__trackedObject.d.ts +28 -0
- package/dist/steps/__value.d.ts +16 -0
- package/dist/steps/access.d.ts +24 -0
- package/dist/steps/connection.d.ts +84 -0
- package/dist/steps/constant.d.ts +20 -0
- package/dist/steps/deepEval.d.ts +19 -0
- package/dist/steps/each.d.ts +5 -0
- package/dist/steps/error.d.ts +15 -0
- package/dist/steps/filter.d.ts +6 -0
- package/dist/steps/first.d.ts +18 -0
- package/dist/steps/graphqlResolver.d.ts +65 -0
- package/dist/steps/groupBy.d.ts +5 -0
- package/dist/steps/index.d.ts +37 -0
- package/dist/steps/lambda.d.ts +23 -0
- package/dist/steps/last.d.ts +17 -0
- package/dist/steps/list.d.ts +24 -0
- package/dist/steps/listTransform.d.ts +45 -0
- package/dist/steps/listen.d.ts +26 -0
- package/dist/steps/loadMany.d.ts +46 -0
- package/dist/steps/loadOne.d.ts +30 -0
- package/dist/steps/map.d.ts +26 -0
- package/dist/steps/node.d.ts +30 -0
- package/dist/steps/object.d.ts +49 -0
- package/dist/steps/partitionByIndex.d.ts +4 -0
- package/dist/steps/proxy.d.ts +22 -0
- package/dist/steps/reverse.d.ts +18 -0
- package/dist/steps/setter.d.ts +27 -0
- package/dist/stringifyPayload.d.ts +3 -0
- package/dist/stripAnsi.d.ts +3 -0
- package/dist/subscribe.d.ts +4 -0
- package/dist/utils.d.ts +60 -0
- package/package.json +60 -9
- package/index.js +0 -1
package/dist/input.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { GraphQLInputType, GraphQLType, ListTypeNode, NamedTypeNode, NonNullTypeNode, ValueNode } from "graphql";
|
|
2
|
+
import type { OperationPlan } from "./engine/OperationPlan.js";
|
|
3
|
+
import { __InputDynamicScalarStep } from "./steps/__inputDynamicScalar.js";
|
|
4
|
+
import { __InputObjectStep } from "./steps/__inputObject.js";
|
|
5
|
+
import type { ConstantStep } from "./steps/index.js";
|
|
6
|
+
import { __InputListStep, __InputStaticLeafStep, __TrackedObjectStep } from "./steps/index.js";
|
|
7
|
+
export declare type InputStep = __TrackedObjectStep | __InputListStep | __InputStaticLeafStep | __InputDynamicScalarStep | __InputObjectStep | ConstantStep<undefined>;
|
|
8
|
+
export declare function assertInputStep(itemPlan: unknown): asserts itemPlan is InputStep;
|
|
9
|
+
export declare function graphqlGetTypeForNode(operationPlan: OperationPlan, node: NamedTypeNode | ListTypeNode | NonNullTypeNode): GraphQLType;
|
|
10
|
+
export declare function inputPlan(operationPlan: OperationPlan, inputType: GraphQLInputType, seenTypes: Set<GraphQLInputType>, rawInputValue: ValueNode | undefined, defaultValue?: ValueNode | undefined): InputStep;
|
|
11
|
+
//# sourceMappingURL=input.d.ts.map
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import type EventEmitter from "eventemitter3";
|
|
2
|
+
import type { PluginHook } from "graphile-config";
|
|
3
|
+
import type { ASTNode, ExecutionArgs, GraphQLArgument, GraphQLArgumentConfig, GraphQLField, GraphQLFieldConfig, GraphQLInputField, GraphQLInputFieldConfig, GraphQLInputObjectType, GraphQLInputType, GraphQLList, GraphQLNonNull, GraphQLOutputType, GraphQLScalarType, GraphQLSchema, GraphQLType } from "graphql";
|
|
4
|
+
import type { Bucket, RequestContext } from "./bucket.js";
|
|
5
|
+
import type { GrafastError } from "./error.js";
|
|
6
|
+
import type { InputStep } from "./input.js";
|
|
7
|
+
import type { ExecutableStep, ListCapableStep, ModifierStep } from "./step.js";
|
|
8
|
+
import type { GraphileInputObjectType, GraphileObjectType } from "./utils.js";
|
|
9
|
+
declare type PromiseOrValue<T> = T | Promise<T>;
|
|
10
|
+
export interface GrafastOptions {
|
|
11
|
+
context?: Record<string, any> | (<TContext extends Record<string, any>>(ctx: GraphileConfig.GraphQLRequestContext, currentContext?: Partial<TContext>) => PromiseOrValue<Partial<TContext>>);
|
|
12
|
+
explain?: boolean | string[];
|
|
13
|
+
}
|
|
14
|
+
declare global {
|
|
15
|
+
namespace GraphileConfig {
|
|
16
|
+
interface GraphQLRequestContext {
|
|
17
|
+
}
|
|
18
|
+
interface Preset {
|
|
19
|
+
grafast?: GrafastOptions;
|
|
20
|
+
}
|
|
21
|
+
interface GrafastHooks {
|
|
22
|
+
args: PluginHook<(event: {
|
|
23
|
+
args: ExecutionArgs;
|
|
24
|
+
ctx: GraphileConfig.GraphQLRequestContext;
|
|
25
|
+
resolvedPreset: GraphileConfig.ResolvedPreset;
|
|
26
|
+
}) => PromiseOrValue<ExecutionArgs>>;
|
|
27
|
+
}
|
|
28
|
+
interface Plugin {
|
|
29
|
+
grafast?: {
|
|
30
|
+
hooks?: GrafastHooks;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export interface GrafastFieldExtensions {
|
|
36
|
+
plan?: FieldPlanResolver<any, any, any>;
|
|
37
|
+
subscribePlan?: FieldPlanResolver<any, any, any>;
|
|
38
|
+
}
|
|
39
|
+
export interface GrafastArgumentExtensions {
|
|
40
|
+
inputPlan?: ArgumentInputPlanResolver;
|
|
41
|
+
applyPlan?: ArgumentApplyPlanResolver;
|
|
42
|
+
}
|
|
43
|
+
export interface GrafastInputObjectTypeExtensions {
|
|
44
|
+
inputPlan?: InputObjectTypeInputPlanResolver;
|
|
45
|
+
}
|
|
46
|
+
export interface GrafastInputFieldExtensions {
|
|
47
|
+
inputPlan?: InputObjectFieldInputPlanResolver;
|
|
48
|
+
applyPlan?: InputObjectFieldApplyPlanResolver;
|
|
49
|
+
}
|
|
50
|
+
export interface GrafastObjectTypeExtensions {
|
|
51
|
+
Step?: {
|
|
52
|
+
new (...args: any[]): ExecutableStep;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
export interface GrafastEnumTypeExtensions {
|
|
56
|
+
}
|
|
57
|
+
export interface GrafastEnumValueExtensions {
|
|
58
|
+
applyPlan?: EnumValueApplyPlanResolver<any>;
|
|
59
|
+
}
|
|
60
|
+
export interface GrafastScalarTypeExtensions {
|
|
61
|
+
plan?: ScalarPlanResolver;
|
|
62
|
+
inputPlan?: ScalarInputPlanResolver;
|
|
63
|
+
idempotent?: boolean;
|
|
64
|
+
}
|
|
65
|
+
declare module "graphql" {
|
|
66
|
+
interface GraphQLFieldExtensions<_TSource, _TContext, _TArgs = any> {
|
|
67
|
+
graphile?: GrafastFieldExtensions;
|
|
68
|
+
}
|
|
69
|
+
interface GraphQLArgumentExtensions {
|
|
70
|
+
graphile?: GrafastArgumentExtensions;
|
|
71
|
+
}
|
|
72
|
+
interface GraphQLInputObjectTypeExtensions {
|
|
73
|
+
graphile?: GrafastInputObjectTypeExtensions;
|
|
74
|
+
}
|
|
75
|
+
interface GraphQLInputFieldExtensions {
|
|
76
|
+
graphile?: GrafastInputFieldExtensions;
|
|
77
|
+
}
|
|
78
|
+
interface GraphQLObjectTypeExtensions<_TSource = any, _TContext = any> {
|
|
79
|
+
graphile?: GrafastObjectTypeExtensions;
|
|
80
|
+
}
|
|
81
|
+
interface GraphQLEnumTypeExtensions {
|
|
82
|
+
graphile?: GrafastEnumTypeExtensions;
|
|
83
|
+
}
|
|
84
|
+
interface GraphQLEnumValueExtensions {
|
|
85
|
+
graphile?: GrafastEnumValueExtensions;
|
|
86
|
+
}
|
|
87
|
+
interface GraphQLScalarTypeExtensions {
|
|
88
|
+
graphile?: GrafastScalarTypeExtensions;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
export declare const $$grafastContext: unique symbol;
|
|
92
|
+
export declare const $$planResults: unique symbol;
|
|
93
|
+
export declare const $$id: unique symbol;
|
|
94
|
+
export declare const $$verbatim: unique symbol;
|
|
95
|
+
export declare const $$bypassGraphQL: unique symbol;
|
|
96
|
+
export declare const $$data: unique symbol;
|
|
97
|
+
export declare const $$extensions: unique symbol;
|
|
98
|
+
export declare const $$concreteType: unique symbol;
|
|
99
|
+
export declare const $$idempotent: unique symbol;
|
|
100
|
+
export declare const $$eventEmitter: unique symbol;
|
|
101
|
+
export declare const $$streamMore: unique symbol;
|
|
102
|
+
export declare const $$proxy: unique symbol;
|
|
103
|
+
export interface PolymorphicData<TType extends string = string, TData = any> {
|
|
104
|
+
[$$concreteType]: TType;
|
|
105
|
+
[$$data]?: TData;
|
|
106
|
+
}
|
|
107
|
+
export interface IndexByListItemStepId {
|
|
108
|
+
[listItemStepId: number]: number;
|
|
109
|
+
}
|
|
110
|
+
export declare type GrafastValuesList<T> = ReadonlyArray<T>;
|
|
111
|
+
export declare type PromiseOrDirect<T> = PromiseLike<T> | T;
|
|
112
|
+
export declare type GrafastResultsList<T> = ReadonlyArray<PromiseOrDirect<T>>;
|
|
113
|
+
export declare type GrafastResultStreamList<T> = ReadonlyArray<AsyncIterable<PromiseOrDirect<T>> | GrafastError>;
|
|
114
|
+
export declare type BaseGraphQLRootValue = any;
|
|
115
|
+
export interface BaseGraphQLContext {
|
|
116
|
+
}
|
|
117
|
+
export interface BaseGraphQLVariables {
|
|
118
|
+
[key: string]: unknown;
|
|
119
|
+
}
|
|
120
|
+
export interface BaseGraphQLArguments {
|
|
121
|
+
[key: string]: any;
|
|
122
|
+
}
|
|
123
|
+
export declare type BaseGraphQLInputObject = BaseGraphQLArguments;
|
|
124
|
+
export interface FieldArgs {
|
|
125
|
+
get(path?: string | string[]): ExecutableStep;
|
|
126
|
+
getRaw(path?: string | string[]): InputStep;
|
|
127
|
+
apply($target: ExecutableStep | ModifierStep, path?: string | string[]): void;
|
|
128
|
+
}
|
|
129
|
+
export interface FieldInfo {
|
|
130
|
+
field: GraphQLField<any, any, any>;
|
|
131
|
+
schema: GraphQLSchema;
|
|
132
|
+
}
|
|
133
|
+
export declare type FieldPlanResolver<_TArgs extends BaseGraphQLArguments, TParentStep extends ExecutableStep<any> | null, TResultStep extends ExecutableStep<any>> = ($parentPlan: TParentStep, args: FieldArgs, info: FieldInfo) => TResultStep | null;
|
|
134
|
+
export declare type InputObjectFieldInputPlanResolver<TResultStep extends ExecutableStep<any> = ExecutableStep<any>> = (input: FieldArgs, info: {
|
|
135
|
+
schema: GraphQLSchema;
|
|
136
|
+
entity: GraphQLInputField;
|
|
137
|
+
}) => TResultStep;
|
|
138
|
+
export declare type InputObjectFieldApplyPlanResolver<TFieldStep extends ExecutableStep<any> | ModifierStep<any> = ExecutableStep<any> | ModifierStep<any>, TResultStep extends ModifierStep<ExecutableStep<any> | ModifierStep<any>> | null | void = ModifierStep<ExecutableStep<any> | ModifierStep<any>> | null | void> = ($fieldPlan: TFieldStep, input: FieldArgs, info: {
|
|
139
|
+
schema: GraphQLSchema;
|
|
140
|
+
entity: GraphQLInputField;
|
|
141
|
+
}) => TResultStep;
|
|
142
|
+
export declare type InputObjectTypeInputPlanResolver = (input: FieldArgs, info: {
|
|
143
|
+
schema: GraphQLSchema;
|
|
144
|
+
type: GraphQLInputObjectType;
|
|
145
|
+
}) => ExecutableStep;
|
|
146
|
+
export declare type ArgumentInputPlanResolver<TParentStep extends ExecutableStep<any> = ExecutableStep<any>, TResultStep extends ExecutableStep<any> = ExecutableStep<any>> = ($parentPlan: TParentStep, input: FieldArgs, info: {
|
|
147
|
+
schema: GraphQLSchema;
|
|
148
|
+
entity: GraphQLArgument;
|
|
149
|
+
}) => TResultStep;
|
|
150
|
+
export declare type ArgumentApplyPlanResolver<TParentStep extends ExecutableStep<any> = ExecutableStep<any>, TFieldStep extends ExecutableStep<any> | ModifierStep<any> = ExecutableStep<any> | ModifierStep<any>, TResultStep extends ExecutableStep | ModifierStep<ExecutableStep | ModifierStep> | null | void = ExecutableStep | ModifierStep<ExecutableStep | ModifierStep> | null | void> = ($parentPlan: TParentStep, $fieldPlan: TFieldStep, input: FieldArgs, info: {
|
|
151
|
+
schema: GraphQLSchema;
|
|
152
|
+
entity: GraphQLArgument;
|
|
153
|
+
}) => TResultStep;
|
|
154
|
+
export declare type ScalarPlanResolver<TParentStep extends ExecutableStep<any> = ExecutableStep<any>, TResultStep extends ExecutableStep<any> = ExecutableStep<any>> = ($parentPlan: TParentStep, info: {
|
|
155
|
+
schema: GraphQLSchema;
|
|
156
|
+
}) => TResultStep;
|
|
157
|
+
export declare type ScalarInputPlanResolver<TResultStep extends ExecutableStep<any> = ExecutableStep<any>> = ($inputValue: InputStep, info: {
|
|
158
|
+
schema: GraphQLSchema;
|
|
159
|
+
type: GraphQLScalarType;
|
|
160
|
+
}) => TResultStep;
|
|
161
|
+
export declare type EnumValueApplyPlanResolver<TParentStep extends ExecutableStep | ModifierStep = ExecutableStep | ModifierStep> = ($parent: TParentStep) => ModifierStep | void;
|
|
162
|
+
declare type OutputPlanForNamedType<TType extends GraphQLType> = TType extends GraphileObjectType<any, infer TStep, any> ? TStep : ExecutableStep<any>;
|
|
163
|
+
export declare type OutputPlanForType<TType extends GraphQLOutputType> = TType extends GraphQLNonNull<GraphQLList<GraphQLNonNull<infer U>>> ? ListCapableStep<any, OutputPlanForNamedType<U>> : TType extends GraphQLNonNull<GraphQLList<infer U>> ? ListCapableStep<any, OutputPlanForNamedType<U>> : TType extends GraphQLList<GraphQLNonNull<infer U>> ? ListCapableStep<any, OutputPlanForNamedType<U>> : TType extends GraphQLList<infer U> ? ListCapableStep<any, OutputPlanForNamedType<U>> : TType extends GraphQLNonNull<infer U> ? OutputPlanForNamedType<U> : OutputPlanForNamedType<TType>;
|
|
164
|
+
declare type InputPlanForNamedType<TType extends GraphQLType> = TType extends GraphileInputObjectType<any, infer U, any> ? U : ModifierStep<any>;
|
|
165
|
+
declare type InputPlanForType<TType extends GraphQLInputType> = TType extends GraphQLNonNull<GraphQLList<GraphQLNonNull<infer U>>> ? InputPlanForNamedType<U> : TType extends GraphQLNonNull<GraphQLList<infer U>> ? InputPlanForNamedType<U> : TType extends GraphQLList<GraphQLNonNull<infer U>> ? InputPlanForNamedType<U> : TType extends GraphQLList<infer U> ? InputPlanForNamedType<U> : TType extends GraphQLNonNull<infer U> ? InputPlanForNamedType<U> : InputPlanForNamedType<TType>;
|
|
166
|
+
declare type InputTypeForNamedType<TType extends GraphQLType> = TType extends GraphQLScalarType<infer U> ? U : any;
|
|
167
|
+
declare type InputTypeFor<TType extends GraphQLInputType> = TType extends GraphQLNonNull<GraphQLList<GraphQLNonNull<infer U>>> ? InputTypeForNamedType<U> : TType extends GraphQLNonNull<GraphQLList<infer U>> ? InputTypeForNamedType<U> : TType extends GraphQLList<GraphQLNonNull<infer U>> ? InputTypeForNamedType<U> : TType extends GraphQLList<infer U> ? InputTypeForNamedType<U> : TType extends GraphQLNonNull<infer U> ? InputTypeForNamedType<U> : InputTypeForNamedType<TType>;
|
|
168
|
+
export declare type GraphileFieldConfig<TType extends GraphQLOutputType, TContext extends BaseGraphQLContext, TParentStep extends ExecutableStep<any> | null, TFieldStep extends ExecutableStep<any>, TArgs extends BaseGraphQLArguments> = Omit<GraphQLFieldConfig<any, any>, "args" | "type"> & {
|
|
169
|
+
type: TType;
|
|
170
|
+
plan?: FieldPlanResolver<TArgs, TParentStep, TFieldStep>;
|
|
171
|
+
subscribePlan?: FieldPlanResolver<TArgs, TParentStep, TFieldStep>;
|
|
172
|
+
args?: GraphileFieldConfigArgumentMap<TType, TContext, TParentStep, TFieldStep>;
|
|
173
|
+
};
|
|
174
|
+
export declare type GraphileFieldConfigArgumentMap<_TType extends GraphQLOutputType, TContext extends BaseGraphQLContext, TParentStep extends ExecutableStep<any> | null, TFieldStep extends ExecutableStep<any>> = {
|
|
175
|
+
[argName: string]: GraphileArgumentConfig<any, TContext, TParentStep, TFieldStep, any, any>;
|
|
176
|
+
};
|
|
177
|
+
export declare type GraphileArgumentConfig<TInputType extends GraphQLInputType, _TContext extends BaseGraphQLContext, _TParentStep extends ExecutableStep<any> | null, TFieldStep extends ExecutableStep<any>, _TArgumentStep extends TFieldStep extends ExecutableStep<any> ? ModifierStep<TFieldStep> | null : null, _TInput extends InputTypeFor<TInputType>> = Omit<GraphQLArgumentConfig, "type"> & {
|
|
178
|
+
type: TInputType;
|
|
179
|
+
inputPlan?: ArgumentInputPlanResolver<any>;
|
|
180
|
+
applyPlan?: ArgumentApplyPlanResolver<any, any>;
|
|
181
|
+
};
|
|
182
|
+
export declare type GraphileInputFieldConfig<TInputType extends GraphQLInputType, _TContext extends BaseGraphQLContext, _TParentStep extends ModifierStep<any>, _TResultStep extends InputPlanForType<TInputType>, _TInput extends InputTypeFor<TInputType>> = Omit<GraphQLInputFieldConfig, "type"> & {
|
|
183
|
+
type: TInputType;
|
|
184
|
+
inputPlan?: InputObjectFieldInputPlanResolver;
|
|
185
|
+
applyPlan?: InputObjectFieldApplyPlanResolver<any>;
|
|
186
|
+
};
|
|
187
|
+
export declare type TrackedArguments<TArgs extends BaseGraphQLArguments = BaseGraphQLArguments> = {
|
|
188
|
+
get<TKey extends keyof TArgs>(key: TKey): InputStep;
|
|
189
|
+
};
|
|
190
|
+
export interface StepStreamOptions {
|
|
191
|
+
initialCount: number;
|
|
192
|
+
}
|
|
193
|
+
export interface StepOptions {
|
|
194
|
+
stream: StepStreamOptions | null;
|
|
195
|
+
}
|
|
196
|
+
export interface StepOptimizeOptions {
|
|
197
|
+
stream: StepStreamOptions | null;
|
|
198
|
+
}
|
|
199
|
+
export declare type GrafastSubscriber<TTopics extends {
|
|
200
|
+
[key: string]: any;
|
|
201
|
+
} = {
|
|
202
|
+
[key: string]: any;
|
|
203
|
+
}> = {
|
|
204
|
+
subscribe<TTopic extends keyof TTopics = keyof TTopics>(topic: TTopic): AsyncIterableIterator<TTopics[TTopic]>;
|
|
205
|
+
};
|
|
206
|
+
export interface NodeIdCodec<T = any> {
|
|
207
|
+
encode(value: T): string | null;
|
|
208
|
+
decode(value: string): T;
|
|
209
|
+
}
|
|
210
|
+
export declare type NodeIdHandler<TCodecs extends {
|
|
211
|
+
[key: string]: NodeIdCodec<any>;
|
|
212
|
+
} = {
|
|
213
|
+
[key: string]: NodeIdCodec<any>;
|
|
214
|
+
}, TCodecName extends keyof TCodecs = keyof TCodecs, TNodeStep extends ExecutableStep<any> = ExecutableStep<any>, TSpec = any> = {
|
|
215
|
+
typeName: string;
|
|
216
|
+
codecName: TCodecName & string;
|
|
217
|
+
match(specifier: TCodecs[TCodecName] extends NodeIdCodec<infer U> ? U : any): boolean;
|
|
218
|
+
plan($thing: TNodeStep): ExecutableStep<TCodecs[TCodecName] extends NodeIdCodec<infer U> ? U : any>;
|
|
219
|
+
getSpec(plan: ExecutableStep<TCodecs[TCodecName] extends NodeIdCodec<infer U> ? U : any>): TSpec;
|
|
220
|
+
get(spec: TSpec): TNodeStep;
|
|
221
|
+
deprecationReason?: string;
|
|
222
|
+
};
|
|
223
|
+
export declare type BaseEventMap = Record<string, any>;
|
|
224
|
+
export declare type EventMapKey<TEventMap extends BaseEventMap> = string & keyof TEventMap;
|
|
225
|
+
export declare type EventCallback<TPayload> = (params: TPayload) => void;
|
|
226
|
+
export interface TypedEventEmitter<TEventMap extends BaseEventMap> extends EventEmitter<any, any> {
|
|
227
|
+
addListener<TEventName extends EventMapKey<TEventMap>>(eventName: TEventName, callback: EventCallback<TEventMap[TEventName]>): this;
|
|
228
|
+
on<TEventName extends EventMapKey<TEventMap>>(eventName: TEventName, callback: EventCallback<TEventMap[TEventName]>): this;
|
|
229
|
+
once<TEventName extends EventMapKey<TEventMap>>(eventName: TEventName, callback: EventCallback<TEventMap[TEventName]>): this;
|
|
230
|
+
removeListener<TEventName extends EventMapKey<TEventMap>>(eventName: TEventName, callback: EventCallback<TEventMap[TEventName]>): this;
|
|
231
|
+
off<TEventName extends EventMapKey<TEventMap>>(eventName: TEventName, callback: EventCallback<TEventMap[TEventName]>): this;
|
|
232
|
+
emit<TEventName extends EventMapKey<TEventMap>>(eventName: TEventName, params: TEventMap[TEventName]): boolean;
|
|
233
|
+
}
|
|
234
|
+
export declare type ExecutionEventMap = {
|
|
235
|
+
explainOperation: {
|
|
236
|
+
operation: Record<string, any> & {
|
|
237
|
+
type: string;
|
|
238
|
+
title: string;
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
};
|
|
242
|
+
export declare type ExecutionEventEmitter = TypedEventEmitter<ExecutionEventMap>;
|
|
243
|
+
export interface ExecutionExtra {
|
|
244
|
+
meta: Record<string, unknown>;
|
|
245
|
+
eventEmitter: ExecutionEventEmitter | undefined;
|
|
246
|
+
_bucket: Bucket;
|
|
247
|
+
_requestContext: RequestContext;
|
|
248
|
+
}
|
|
249
|
+
export interface LocationDetails {
|
|
250
|
+
node: ASTNode | readonly ASTNode[];
|
|
251
|
+
parentTypeName: string | null;
|
|
252
|
+
fieldName: string | null;
|
|
253
|
+
}
|
|
254
|
+
export declare type JSONValue = boolean | number | string | null | JSONObject | JSONArray;
|
|
255
|
+
export interface JSONObject {
|
|
256
|
+
[key: string]: JSONValue;
|
|
257
|
+
}
|
|
258
|
+
export interface JSONArray extends Array<JSONValue> {
|
|
259
|
+
}
|
|
260
|
+
export {};
|
|
261
|
+
//# sourceMappingURL=interfaces.d.ts.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { GraphQLFieldResolver, GraphQLScalarLiteralParser, GraphQLScalarSerializer, GraphQLScalarValueParser, GraphQLSchema } from "graphql";
|
|
2
|
+
import type { ArgumentApplyPlanResolver, ArgumentInputPlanResolver, EnumValueApplyPlanResolver, FieldPlanResolver, InputObjectFieldApplyPlanResolver, InputObjectFieldInputPlanResolver, ScalarPlanResolver } from "./interfaces.js";
|
|
3
|
+
import type { ExecutableStep } from "./step.js";
|
|
4
|
+
export declare type FieldPlans = FieldPlanResolver<any, any, any> | {
|
|
5
|
+
plan?: FieldPlanResolver<any, any, any>;
|
|
6
|
+
subscribePlan?: FieldPlanResolver<any, any, any>;
|
|
7
|
+
resolve?: GraphQLFieldResolver<any, any>;
|
|
8
|
+
subscribe?: GraphQLFieldResolver<any, any>;
|
|
9
|
+
args?: {
|
|
10
|
+
[argName: string]: {
|
|
11
|
+
input?: ArgumentInputPlanResolver;
|
|
12
|
+
apply?: ArgumentApplyPlanResolver;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export declare type ObjectPlans = {
|
|
17
|
+
__Step?: {
|
|
18
|
+
new (...args: any[]): ExecutableStep<any>;
|
|
19
|
+
};
|
|
20
|
+
} & {
|
|
21
|
+
[fieldName: string]: FieldPlans;
|
|
22
|
+
};
|
|
23
|
+
export declare type InputObjectPlans = {
|
|
24
|
+
[fieldName: string]: {
|
|
25
|
+
input: InputObjectFieldInputPlanResolver;
|
|
26
|
+
apply: InputObjectFieldApplyPlanResolver;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export declare type InterfaceOrUnionPlans = {
|
|
30
|
+
__resolveType?: (o: unknown) => string;
|
|
31
|
+
};
|
|
32
|
+
export declare type ScalarPlans = {
|
|
33
|
+
serialize?: GraphQLScalarSerializer<any>;
|
|
34
|
+
parseValue?: GraphQLScalarValueParser<any>;
|
|
35
|
+
parseLiteral?: GraphQLScalarLiteralParser<any>;
|
|
36
|
+
plan?: ScalarPlanResolver<any, any>;
|
|
37
|
+
};
|
|
38
|
+
export declare type EnumPlans = {
|
|
39
|
+
[enumValueName: string]: EnumValueApplyPlanResolver | string | number | boolean | {
|
|
40
|
+
value?: unknown;
|
|
41
|
+
apply?: EnumValueApplyPlanResolver;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export interface GrafastPlans {
|
|
45
|
+
[typeName: string]: ObjectPlans | InputObjectPlans | InterfaceOrUnionPlans | ScalarPlans | EnumPlans;
|
|
46
|
+
}
|
|
47
|
+
export declare function makeGrafastSchema(details: {
|
|
48
|
+
typeDefs: string;
|
|
49
|
+
plans: GrafastPlans;
|
|
50
|
+
enableDeferStream: boolean;
|
|
51
|
+
}): GraphQLSchema;
|
|
52
|
+
//# sourceMappingURL=makeGrafastSchema.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { OperationPlan } from ".";
|
|
2
|
+
import type { ExecutableStep } from "./step.js";
|
|
3
|
+
export declare const COLORS: string[];
|
|
4
|
+
export declare const mermaidEscape: (str: string) => string;
|
|
5
|
+
export interface PrintPlanGraphOptions {
|
|
6
|
+
printPathRelations?: boolean;
|
|
7
|
+
includePaths?: boolean;
|
|
8
|
+
concise?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function printPlanGraph(operationPlan: OperationPlan, { concise, }: PrintPlanGraphOptions, { steps, }: {
|
|
11
|
+
steps: {
|
|
12
|
+
[stepId: number]: ExecutableStep;
|
|
13
|
+
};
|
|
14
|
+
}): string;
|
|
15
|
+
//# sourceMappingURL=mermaid.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { GraphQLField } from "graphql";
|
|
2
|
+
import type { OperationPlan } from "./engine/OperationPlan.js";
|
|
3
|
+
import type { FieldArgs, TrackedArguments } from "./interfaces.js";
|
|
4
|
+
import { ExecutableStep } from "./step.js";
|
|
5
|
+
export declare function withFieldArgsForArguments<T extends ExecutableStep, TParentStep extends ExecutableStep<any> = ExecutableStep<any>>(operationPlan: OperationPlan, parentPlan: TParentStep, $all: TrackedArguments, field: GraphQLField<any, any, any>, callback: (fieldArgs: FieldArgs) => T | null | undefined): Exclude<T, undefined | null | void> | TParentStep;
|
|
6
|
+
//# sourceMappingURL=opPlan-input.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { PolymorphicData } from "./interfaces.js";
|
|
2
|
+
export declare function isPolymorphicData(data: unknown): data is PolymorphicData;
|
|
3
|
+
export declare function assertPolymorphicData(data: unknown): asserts data is PolymorphicData;
|
|
4
|
+
export declare function polymorphicWrap<TType extends string>(type: TType, data?: unknown): PolymorphicData<TType>;
|
|
5
|
+
export declare function resolveType(o: unknown): string;
|
|
6
|
+
//# sourceMappingURL=polymorphic.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ExecutionArgs } from "graphql";
|
|
2
|
+
import type { AsyncExecutionResult, ExecutionResult } from "graphql/execution/execute";
|
|
3
|
+
import type { OperationPlan } from "./index.js";
|
|
4
|
+
import type { PromiseOrDirect } from "./interfaces.js";
|
|
5
|
+
export interface GrafastPrepareOptions {
|
|
6
|
+
explain?: boolean | string[];
|
|
7
|
+
asString?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function executePreemptive(operationPlan: OperationPlan, variableValues: any, context: any, rootValue: any, asString: boolean): PromiseOrDirect<ExecutionResult | AsyncGenerator<AsyncExecutionResult, void, void>>;
|
|
10
|
+
export declare function grafastPrepare(args: ExecutionArgs, options?: GrafastPrepareOptions): PromiseOrDirect<ExecutionResult | AsyncGenerator<AsyncExecutionResult, void, void>>;
|
|
11
|
+
//# sourceMappingURL=prepare.d.ts.map
|
package/dist/step.d.ts
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import type { GraphQLObjectType } from "graphql";
|
|
2
|
+
import type { LayerPlan } from "./engine/LayerPlan.js";
|
|
3
|
+
import type { OperationPlan } from "./engine/OperationPlan.js";
|
|
4
|
+
import type { ExecutionExtra, GrafastResultsList, GrafastResultStreamList, GrafastValuesList, PromiseOrDirect, StepOptimizeOptions, StepOptions } from "./interfaces.js";
|
|
5
|
+
import type { __ItemStep } from "./steps/index.js";
|
|
6
|
+
export declare const $$deepDepSkip: unique symbol;
|
|
7
|
+
export declare const $$noExec: unique symbol;
|
|
8
|
+
declare function reallyAssertFinalized(plan: BaseStep): void;
|
|
9
|
+
export declare const assertFinalized: typeof reallyAssertFinalized;
|
|
10
|
+
export declare abstract class BaseStep {
|
|
11
|
+
readonly layerPlan: LayerPlan;
|
|
12
|
+
readonly opPlan: OperationPlan;
|
|
13
|
+
isArgumentsFinalized: boolean;
|
|
14
|
+
isFinalized: boolean;
|
|
15
|
+
debug: boolean;
|
|
16
|
+
hasSideEffects: boolean;
|
|
17
|
+
constructor();
|
|
18
|
+
toString(): string;
|
|
19
|
+
toStringMeta(): string | null;
|
|
20
|
+
finalize(): void;
|
|
21
|
+
destroy(): void;
|
|
22
|
+
}
|
|
23
|
+
export declare class ExecutableStep<TData = any> extends BaseStep {
|
|
24
|
+
static $$export: any;
|
|
25
|
+
isSyncAndSafe: boolean;
|
|
26
|
+
readonly dependencies: ReadonlyArray<ExecutableStep>;
|
|
27
|
+
readonly dependents: ReadonlyArray<{
|
|
28
|
+
step: ExecutableStep;
|
|
29
|
+
dependencyIndex: number;
|
|
30
|
+
}>;
|
|
31
|
+
readonly id: number;
|
|
32
|
+
isOptimized: boolean;
|
|
33
|
+
allowMultipleOptimizations: boolean;
|
|
34
|
+
_stepOptions: StepOptions;
|
|
35
|
+
polymorphicPaths: ReadonlySet<string>;
|
|
36
|
+
store: boolean;
|
|
37
|
+
metaKey: number | string | symbol;
|
|
38
|
+
constructor();
|
|
39
|
+
protected withMyLayerPlan<T>(callback: () => T): T;
|
|
40
|
+
protected getStep(id: number): ExecutableStep;
|
|
41
|
+
getDep(depId: number): ExecutableStep;
|
|
42
|
+
protected getDepDeep(depId: number): ExecutableStep;
|
|
43
|
+
toString(): string;
|
|
44
|
+
protected addDependency(step: ExecutableStep, skipDeduplication?: boolean): number;
|
|
45
|
+
deduplicate(_peers: readonly ExecutableStep[]): readonly ExecutableStep[];
|
|
46
|
+
deduplicatedWith(replacement: ExecutableStep): void;
|
|
47
|
+
optimize(_options: StepOptimizeOptions): ExecutableStep;
|
|
48
|
+
finalize(): void;
|
|
49
|
+
execute(values: ReadonlyArray<GrafastValuesList<any>>, extra: ExecutionExtra): PromiseOrDirect<GrafastResultsList<TData>>;
|
|
50
|
+
destroy(): void;
|
|
51
|
+
}
|
|
52
|
+
export declare abstract class UnbatchedExecutableStep<TData = any> extends ExecutableStep<TData> {
|
|
53
|
+
static $$export: {
|
|
54
|
+
moduleName: string;
|
|
55
|
+
exportName: string;
|
|
56
|
+
};
|
|
57
|
+
finalize(): void;
|
|
58
|
+
execute(values: ReadonlyArray<GrafastValuesList<any>>, extra: ExecutionExtra): PromiseOrDirect<GrafastResultsList<TData>>;
|
|
59
|
+
abstract unbatchedExecute(extra: ExecutionExtra, ...tuple: any[]): PromiseOrDirect<TData>;
|
|
60
|
+
}
|
|
61
|
+
export declare function isExecutableStep<TData = any>(step: unknown): step is ExecutableStep<TData>;
|
|
62
|
+
export declare function assertExecutableStep<TData>(step: BaseStep): asserts step is ExecutableStep<TData>;
|
|
63
|
+
export declare function isUnbatchedExecutableStep<TData = any>(step: unknown): step is UnbatchedExecutableStep<TData>;
|
|
64
|
+
export declare type ObjectLikeStep<TData extends {
|
|
65
|
+
[key: string]: ExecutableStep<any>;
|
|
66
|
+
} = {
|
|
67
|
+
[key: string]: ExecutableStep<any>;
|
|
68
|
+
}> = ExecutableStep<{
|
|
69
|
+
[key in keyof TData]: TData[key] extends ExecutableStep<infer U> ? U : never;
|
|
70
|
+
}> & {
|
|
71
|
+
get<TKey extends keyof TData>(key: TKey): ExecutableStep<TData[TKey]>;
|
|
72
|
+
};
|
|
73
|
+
export declare function isObjectLikeStep<TData extends {
|
|
74
|
+
[key: string]: ExecutableStep<any>;
|
|
75
|
+
} = {
|
|
76
|
+
[key: string]: ExecutableStep<any>;
|
|
77
|
+
}>(plan: ExecutableStep): plan is ObjectLikeStep<TData>;
|
|
78
|
+
export declare type StreamableStep<TData> = ExecutableStep<ReadonlyArray<TData>> & {
|
|
79
|
+
stream(values: ReadonlyArray<GrafastValuesList<any>>, extra: ExecutionExtra, streamOptions: {
|
|
80
|
+
initialCount: number;
|
|
81
|
+
}): PromiseOrDirect<GrafastResultStreamList<TData>>;
|
|
82
|
+
};
|
|
83
|
+
export declare function isStreamableStep<TData>(plan: ExecutableStep<ReadonlyArray<TData>>): plan is StreamableStep<TData>;
|
|
84
|
+
export declare type PolymorphicStep = ExecutableStep & {
|
|
85
|
+
planForType(objectType: GraphQLObjectType): ExecutableStep;
|
|
86
|
+
};
|
|
87
|
+
export declare function isPolymorphicStep(s: ExecutableStep): s is PolymorphicStep;
|
|
88
|
+
export declare abstract class ModifierStep<TParentStep extends BaseStep = BaseStep> extends BaseStep {
|
|
89
|
+
protected readonly $parent: TParentStep;
|
|
90
|
+
static $$export: any;
|
|
91
|
+
readonly id: string;
|
|
92
|
+
constructor($parent: TParentStep);
|
|
93
|
+
toString(): string;
|
|
94
|
+
abstract apply(): void;
|
|
95
|
+
}
|
|
96
|
+
export declare function isModifierStep<TParentStep extends ExecutableStep | ModifierStep<any>>(plan: BaseStep): plan is ModifierStep<TParentStep>;
|
|
97
|
+
export declare function assertModifierStep<TParentStep extends ExecutableStep | ModifierStep<any>>(plan: BaseStep, pathDescription: string): asserts plan is ModifierStep<TParentStep>;
|
|
98
|
+
export interface ListCapableStep<TOutputData, TItemStep extends ExecutableStep<TOutputData> = ExecutableStep<TOutputData>> extends ExecutableStep<ReadonlyArray<any>> {
|
|
99
|
+
listItem(itemPlan: __ItemStep<this>): TItemStep;
|
|
100
|
+
}
|
|
101
|
+
export declare function isListCapableStep<TData, TItemStep extends ExecutableStep<TData>>(plan: ExecutableStep<ReadonlyArray<TData>>): plan is ListCapableStep<TData, TItemStep>;
|
|
102
|
+
export declare function assertListCapableStep<TData, TItemStep extends ExecutableStep<TData>>(plan: ExecutableStep<ReadonlyArray<TData>>, pathDescription: string): asserts plan is ListCapableStep<TData, TItemStep>;
|
|
103
|
+
export {};
|
|
104
|
+
//# sourceMappingURL=step.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { GraphQLScalarType, ListValueNode, ObjectValueNode } from "graphql";
|
|
2
|
+
import type { ExecutionExtra } from "../interfaces.js";
|
|
3
|
+
import { UnbatchedExecutableStep } from "../step.js";
|
|
4
|
+
export declare class __InputDynamicScalarStep<TLeaf = any> extends UnbatchedExecutableStep<TLeaf> {
|
|
5
|
+
private value;
|
|
6
|
+
static $$export: {
|
|
7
|
+
moduleName: string;
|
|
8
|
+
exportName: string;
|
|
9
|
+
};
|
|
10
|
+
isSyncAndSafe: boolean;
|
|
11
|
+
private variableNames;
|
|
12
|
+
constructor(inputType: GraphQLScalarType, value: ListValueNode | ObjectValueNode);
|
|
13
|
+
valueFromValues(variableValues: any[]): any;
|
|
14
|
+
unbatchedExecute: (extra: ExecutionExtra, ...variableValues: any[]) => TLeaf;
|
|
15
|
+
eval(): TLeaf;
|
|
16
|
+
evalIs(expectedValue: undefined | null | 0): boolean;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=__inputDynamicScalar.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { GraphQLInputType, ValueNode } from "graphql";
|
|
2
|
+
import { GraphQLList } from "graphql";
|
|
3
|
+
import type { InputStep } from "../input.js";
|
|
4
|
+
import { ExecutableStep } from "../step.js";
|
|
5
|
+
import type { ConstantStep } from "./constant.js";
|
|
6
|
+
export declare class __InputListStep extends ExecutableStep {
|
|
7
|
+
private readonly inputValues;
|
|
8
|
+
static $$export: {
|
|
9
|
+
moduleName: string;
|
|
10
|
+
exportName: string;
|
|
11
|
+
};
|
|
12
|
+
isSyncAndSafe: boolean;
|
|
13
|
+
private itemCount;
|
|
14
|
+
constructor(inputType: GraphQLList<GraphQLInputType>, seenTypes: Set<GraphQLInputType>, inputValues: ValueNode | undefined);
|
|
15
|
+
optimize(): ConstantStep<null> | ConstantStep<any[]>;
|
|
16
|
+
execute(): any[];
|
|
17
|
+
unbatchedExecute: () => any;
|
|
18
|
+
at(index: number): InputStep | ConstantStep<undefined>;
|
|
19
|
+
eval(): any[] | null;
|
|
20
|
+
evalIs(value: null | undefined | 0): boolean;
|
|
21
|
+
evalLength(): number | null;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=__inputList.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { GraphQLInputObjectType, GraphQLInputType, ValueNode } from "graphql";
|
|
2
|
+
import type { InputStep } from "../input.js";
|
|
3
|
+
import type { ExecutionExtra } from "../interfaces.js";
|
|
4
|
+
import { UnbatchedExecutableStep } from "../step.js";
|
|
5
|
+
export declare class __InputObjectStep extends UnbatchedExecutableStep {
|
|
6
|
+
private inputObjectType;
|
|
7
|
+
private inputValues;
|
|
8
|
+
static $$export: {
|
|
9
|
+
moduleName: string;
|
|
10
|
+
exportName: string;
|
|
11
|
+
};
|
|
12
|
+
isSyncAndSafe: boolean;
|
|
13
|
+
private inputFields;
|
|
14
|
+
constructor(inputObjectType: GraphQLInputObjectType, seenTypes: Set<GraphQLInputType>, inputValues: ValueNode | undefined);
|
|
15
|
+
optimize(): this | import("./constant.js").ConstantStep<null>;
|
|
16
|
+
finalize(): void;
|
|
17
|
+
unbatchedExecute(extra: ExecutionExtra, ...values: any[]): any;
|
|
18
|
+
get(attrName: string): InputStep;
|
|
19
|
+
eval(): any;
|
|
20
|
+
evalIs(value: null | undefined | 0): boolean;
|
|
21
|
+
evalIsEmpty(): boolean;
|
|
22
|
+
evalHas(attrName: string): boolean;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=__inputObject.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { GraphQLLeafType, ValueNode } from "graphql";
|
|
2
|
+
import { UnbatchedExecutableStep } from "../step.js";
|
|
3
|
+
export declare class __InputStaticLeafStep<TLeaf = any> extends UnbatchedExecutableStep<TLeaf> {
|
|
4
|
+
static $$export: {
|
|
5
|
+
moduleName: string;
|
|
6
|
+
exportName: string;
|
|
7
|
+
};
|
|
8
|
+
isSyncAndSafe: boolean;
|
|
9
|
+
private readonly coercedValue;
|
|
10
|
+
constructor(inputType: GraphQLLeafType, value: ValueNode | undefined);
|
|
11
|
+
unbatchedExecute(): TLeaf;
|
|
12
|
+
eval(): TLeaf;
|
|
13
|
+
evalIs(expectedValue: unknown): boolean;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=__inputStaticLeaf.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ExecutableStep } from "../step.js";
|
|
2
|
+
import { $$deepDepSkip, $$noExec, UnbatchedExecutableStep } from "../step.js";
|
|
3
|
+
export declare class __ItemStep<TData> extends UnbatchedExecutableStep<TData> {
|
|
4
|
+
readonly depth: number;
|
|
5
|
+
static $$export: {
|
|
6
|
+
moduleName: string;
|
|
7
|
+
exportName: string;
|
|
8
|
+
};
|
|
9
|
+
isSyncAndSafe: boolean;
|
|
10
|
+
[$$noExec]: boolean;
|
|
11
|
+
transformStepId?: number;
|
|
12
|
+
constructor(parentPlan: ExecutableStep<TData> | ExecutableStep<TData[]>, depth?: number);
|
|
13
|
+
toStringMeta(): string;
|
|
14
|
+
[$$deepDepSkip](): ExecutableStep;
|
|
15
|
+
execute(): never;
|
|
16
|
+
unbatchedExecute(): never;
|
|
17
|
+
finalize(): void;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=__item.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Constraint } from "../constraints.js";
|
|
2
|
+
import type { ExecutionExtra, GrafastResultsList, GrafastValuesList } from "../interfaces.js";
|
|
3
|
+
import { UnbatchedExecutableStep } from "../step.js";
|
|
4
|
+
import type { __ValueStep } from "./__value.js";
|
|
5
|
+
import type { AccessStep } from "./access.js";
|
|
6
|
+
export declare class __TrackedObjectStep<TData = any> extends UnbatchedExecutableStep<TData> {
|
|
7
|
+
static $$export: {
|
|
8
|
+
moduleName: string;
|
|
9
|
+
exportName: string;
|
|
10
|
+
};
|
|
11
|
+
isSyncAndSafe: boolean;
|
|
12
|
+
private readonly value;
|
|
13
|
+
private readonly constraints;
|
|
14
|
+
private readonly path;
|
|
15
|
+
constructor(value: TData | undefined, valuePlan: __ValueStep<TData> | AccessStep<TData>, constraints: Constraint[], path?: Array<string | number>);
|
|
16
|
+
execute(values: [GrafastValuesList<TData>]): GrafastResultsList<TData>;
|
|
17
|
+
unbatchedExecute(extra: ExecutionExtra, v: TData): TData;
|
|
18
|
+
private getValuePlan;
|
|
19
|
+
get<TAttribute extends keyof TData & string>(attrName: TAttribute): __TrackedObjectStep<TData[TAttribute]>;
|
|
20
|
+
at<TIndex extends keyof TData & number>(index: TIndex): __TrackedObjectStep<TData[TIndex]>;
|
|
21
|
+
eval(): TData | undefined;
|
|
22
|
+
evalIs(expectedValue: unknown): boolean;
|
|
23
|
+
evalIsEmpty(): boolean;
|
|
24
|
+
evalHas(key: string): boolean;
|
|
25
|
+
evalLength(): number | null;
|
|
26
|
+
optimize(): import("../step.js").ExecutableStep<any>;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=__trackedObject.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { $$noExec, ExecutableStep } from "../step.js";
|
|
2
|
+
import type { AccessStep } from "./access.js";
|
|
3
|
+
export declare class __ValueStep<TData> extends ExecutableStep<TData> {
|
|
4
|
+
static $$export: {
|
|
5
|
+
moduleName: string;
|
|
6
|
+
exportName: string;
|
|
7
|
+
};
|
|
8
|
+
isSyncAndSafe: boolean;
|
|
9
|
+
[$$noExec]: boolean;
|
|
10
|
+
constructor();
|
|
11
|
+
toStringMeta(): string | null;
|
|
12
|
+
execute(): never;
|
|
13
|
+
get<TAttr extends keyof TData>(attrName: TAttr): AccessStep<TData[TAttr]>;
|
|
14
|
+
at<TIndex extends keyof TData>(index: TIndex): AccessStep<TData[TIndex]>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=__value.d.ts.map
|