grafast 0.0.1-0.1 → 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/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/index.js +3 -3
- 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/package.json +1 -1
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { Bucket } from "../bucket.js";
|
|
2
|
+
import type { ExecutableStep, ModifierStep, UnbatchedExecutableStep } from "../step";
|
|
3
|
+
import type { OperationPlan } from "./OperationPlan";
|
|
4
|
+
export interface LayerPlanReasonRoot {
|
|
5
|
+
type: "root";
|
|
6
|
+
}
|
|
7
|
+
export interface LayerPlanReasonNullableField {
|
|
8
|
+
type: "nullableBoundary";
|
|
9
|
+
parentStep: ExecutableStep;
|
|
10
|
+
}
|
|
11
|
+
export interface LayerPlanReasonListItem {
|
|
12
|
+
type: "listItem";
|
|
13
|
+
parentStep: ExecutableStep;
|
|
14
|
+
stream?: {
|
|
15
|
+
initialCount: number;
|
|
16
|
+
label?: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export interface LayerPlanReasonSubscription {
|
|
20
|
+
type: "subscription";
|
|
21
|
+
}
|
|
22
|
+
export interface LayerPlanReasonMutationField {
|
|
23
|
+
type: "mutationField";
|
|
24
|
+
}
|
|
25
|
+
export interface LayerPlanReasonDefer {
|
|
26
|
+
type: "defer";
|
|
27
|
+
label?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface LayerPlanReasonPolymorphic {
|
|
30
|
+
type: "polymorphic";
|
|
31
|
+
typeNames: string[];
|
|
32
|
+
parentStep: ExecutableStep;
|
|
33
|
+
}
|
|
34
|
+
export interface LayerPlanReasonSubroutine {
|
|
35
|
+
type: "subroutine";
|
|
36
|
+
parentStep: ExecutableStep;
|
|
37
|
+
}
|
|
38
|
+
export declare function isBranchingLayerPlan(layerPlan: LayerPlan<any>): boolean;
|
|
39
|
+
export declare function isDeferredLayerPlan(layerPlan: LayerPlan<any>): boolean;
|
|
40
|
+
export declare function isPolymorphicLayerPlan(layerPlan: LayerPlan<any>): boolean;
|
|
41
|
+
export declare type LayerPlanReason = LayerPlanReasonRoot | LayerPlanReasonNullableField | LayerPlanReasonListItem | LayerPlanReasonSubscription | LayerPlanReasonMutationField | LayerPlanReasonDefer | LayerPlanReasonPolymorphic | LayerPlanReasonSubroutine;
|
|
42
|
+
export declare type HasParent<A extends LayerPlanReason> = A extends any ? A extends {
|
|
43
|
+
parentStep: ExecutableStep;
|
|
44
|
+
} ? A : never : never;
|
|
45
|
+
export declare type LayerPlanReasonsWithParentStep = HasParent<LayerPlanReason>;
|
|
46
|
+
export interface LayerPlanPhase {
|
|
47
|
+
normalSteps?: Array<{
|
|
48
|
+
step: ExecutableStep;
|
|
49
|
+
}>;
|
|
50
|
+
unbatchedSyncAndSafeSteps?: Array<{
|
|
51
|
+
step: UnbatchedExecutableStep;
|
|
52
|
+
scratchpad: any;
|
|
53
|
+
}>;
|
|
54
|
+
_allSteps: ExecutableStep[];
|
|
55
|
+
}
|
|
56
|
+
export declare class LayerPlan<TReason extends LayerPlanReason = LayerPlanReason> {
|
|
57
|
+
readonly operationPlan: OperationPlan;
|
|
58
|
+
parentLayerPlan: LayerPlan | null;
|
|
59
|
+
readonly reason: TReason;
|
|
60
|
+
polymorphicPaths: ReadonlySet<string>;
|
|
61
|
+
id: number;
|
|
62
|
+
readonly rootStep: ExecutableStep | null;
|
|
63
|
+
copyPlanIds: number[];
|
|
64
|
+
children: LayerPlan[];
|
|
65
|
+
steps: ExecutableStep[];
|
|
66
|
+
pendingSteps: ExecutableStep[];
|
|
67
|
+
phases: Array<LayerPlanPhase>;
|
|
68
|
+
ancestry: LayerPlan[];
|
|
69
|
+
constructor(operationPlan: OperationPlan, parentLayerPlan: LayerPlan | null, reason: TReason, polymorphicPaths: ReadonlySet<string>);
|
|
70
|
+
toString(): string;
|
|
71
|
+
print(depth?: number): string;
|
|
72
|
+
setRootStep($root: ExecutableStep): void;
|
|
73
|
+
getStep(id: number, requestingStep: ExecutableStep): ExecutableStep;
|
|
74
|
+
_addStep(step: ExecutableStep): number;
|
|
75
|
+
_addModifierStep(step: ModifierStep<any>): string;
|
|
76
|
+
makeNewBucketCallback(inner: string): typeof this.newBucket;
|
|
77
|
+
finalize(): void;
|
|
78
|
+
newBucket(parentBucket: Bucket): Bucket | null;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=LayerPlan.d.ts.map
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import type { FragmentDefinitionNode, GraphQLObjectType, GraphQLSchema, GraphQLUnionType, OperationDefinitionNode } from "graphql";
|
|
2
|
+
import type { Constraint } from "../constraints.js";
|
|
3
|
+
import type { ModifierStep } from "../index.js";
|
|
4
|
+
import { __TrackedObjectStep, __ValueStep, ExecutableStep } from "../index.js";
|
|
5
|
+
import type { PrintPlanGraphOptions } from "../mermaid.js";
|
|
6
|
+
import type { LayerPlanReasonSubroutine } from "./LayerPlan.js";
|
|
7
|
+
import { LayerPlan } from "./LayerPlan.js";
|
|
8
|
+
import { OutputPlan } from "./OutputPlan.js";
|
|
9
|
+
import { StepTracker } from "./StepTracker.js";
|
|
10
|
+
export declare const POLYMORPHIC_ROOT_PATH = "";
|
|
11
|
+
export declare type OperationPlanPhase = "init" | "plan" | "validate" | "optimize" | "finalize" | "ready";
|
|
12
|
+
export interface MetaByMetaKey {
|
|
13
|
+
[metaKey: string | number | symbol]: Record<string, any>;
|
|
14
|
+
}
|
|
15
|
+
export declare class OperationPlan {
|
|
16
|
+
readonly schema: GraphQLSchema;
|
|
17
|
+
readonly operation: OperationDefinitionNode;
|
|
18
|
+
readonly fragments: {
|
|
19
|
+
[fragmentName: string]: FragmentDefinitionNode;
|
|
20
|
+
};
|
|
21
|
+
readonly variableValues: {
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
};
|
|
24
|
+
readonly context: {
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
};
|
|
27
|
+
readonly rootValue: any;
|
|
28
|
+
readonly queryType: GraphQLObjectType;
|
|
29
|
+
readonly mutationType: GraphQLObjectType | null;
|
|
30
|
+
readonly subscriptionType: GraphQLObjectType | null;
|
|
31
|
+
readonly unionsContainingObjectType: {
|
|
32
|
+
[objectTypeName: string]: ReadonlyArray<GraphQLUnionType>;
|
|
33
|
+
};
|
|
34
|
+
private operationType;
|
|
35
|
+
phase: OperationPlanPhase;
|
|
36
|
+
loc: string[] | null;
|
|
37
|
+
rootLayerPlan: LayerPlan;
|
|
38
|
+
rootOutputPlan: OutputPlan;
|
|
39
|
+
private modifierStepCount;
|
|
40
|
+
private modifierDepthCount;
|
|
41
|
+
private modifierSteps;
|
|
42
|
+
readonly stepTracker: StepTracker;
|
|
43
|
+
private maxDeduplicatedStepId;
|
|
44
|
+
private maxValidatedStepId;
|
|
45
|
+
readonly variableValuesConstraints: Constraint[];
|
|
46
|
+
readonly variableValuesStep: __ValueStep<{
|
|
47
|
+
[key: string]: any;
|
|
48
|
+
}>;
|
|
49
|
+
readonly trackedVariableValuesStep: __TrackedObjectStep<{
|
|
50
|
+
[key: string]: any;
|
|
51
|
+
}>;
|
|
52
|
+
readonly contextConstraints: Constraint[];
|
|
53
|
+
readonly contextStep: __ValueStep<{
|
|
54
|
+
[key: string]: any;
|
|
55
|
+
}>;
|
|
56
|
+
readonly trackedContextStep: __TrackedObjectStep<{
|
|
57
|
+
[key: string]: any;
|
|
58
|
+
}>;
|
|
59
|
+
readonly rootValueConstraints: Constraint[];
|
|
60
|
+
readonly rootValueStep: __ValueStep<any>;
|
|
61
|
+
readonly trackedRootValueStep: __TrackedObjectStep<any>;
|
|
62
|
+
makeMetaByMetaKey: () => MetaByMetaKey;
|
|
63
|
+
readonly itemStepIdByListStepId: {
|
|
64
|
+
[listStepId: number]: number | undefined;
|
|
65
|
+
};
|
|
66
|
+
pure: boolean;
|
|
67
|
+
constructor(schema: GraphQLSchema, operation: OperationDefinitionNode, fragments: {
|
|
68
|
+
[fragmentName: string]: FragmentDefinitionNode;
|
|
69
|
+
}, variableValues: {
|
|
70
|
+
[key: string]: any;
|
|
71
|
+
}, context: {
|
|
72
|
+
[key: string]: any;
|
|
73
|
+
}, rootValue: any);
|
|
74
|
+
addLayerPlan(layerPlan: LayerPlan): number;
|
|
75
|
+
_addStep(plan: ExecutableStep): number;
|
|
76
|
+
_addModifierStep(step: ModifierStep<any>): string;
|
|
77
|
+
getStep: (id: number, requestingStep: ExecutableStep) => ExecutableStep;
|
|
78
|
+
dangerouslyGetStep(id: number): ExecutableStep;
|
|
79
|
+
private planOperation;
|
|
80
|
+
private planQuery;
|
|
81
|
+
private planMutation;
|
|
82
|
+
private planSubscription;
|
|
83
|
+
private itemStepForListStep;
|
|
84
|
+
private planSelectionSet;
|
|
85
|
+
private planIntoOutputPlan;
|
|
86
|
+
private polymorphicLayerPlanByPathByLayerPlan;
|
|
87
|
+
private getPolymorphicLayerPlan;
|
|
88
|
+
private planField;
|
|
89
|
+
private getTrackedArguments;
|
|
90
|
+
withModifiers<T>(cb: () => T): T;
|
|
91
|
+
private track;
|
|
92
|
+
private validateSteps;
|
|
93
|
+
private replaceStep;
|
|
94
|
+
processSteps(actionDescription: string, fromStepId: number, order: "dependents-first" | "dependencies-first", callback: (plan: ExecutableStep<any>) => ExecutableStep<any>): void;
|
|
95
|
+
private getPeers;
|
|
96
|
+
private isImmoveable;
|
|
97
|
+
private hoistStep;
|
|
98
|
+
private pushDown;
|
|
99
|
+
private _deduplicateInnerLogic;
|
|
100
|
+
private deduplicateStep;
|
|
101
|
+
private deduplicateSteps;
|
|
102
|
+
private hoistSteps;
|
|
103
|
+
private pushDownSteps;
|
|
104
|
+
private getStepOptionsForStep;
|
|
105
|
+
private optimizeStep;
|
|
106
|
+
private optimizeSteps;
|
|
107
|
+
private finalizeSteps;
|
|
108
|
+
private finalizeLayerPlans;
|
|
109
|
+
private optimizeOutputPlans;
|
|
110
|
+
private finalizeOutputPlans;
|
|
111
|
+
private walkOutputPlans;
|
|
112
|
+
printPlanGraph(options?: PrintPlanGraphOptions): string;
|
|
113
|
+
finishSubroutine(subroutineStep: ExecutableStep, layerPlan: LayerPlan<LayerPlanReasonSubroutine>): void;
|
|
114
|
+
deleteLayerPlan(layerPlan: LayerPlan): void;
|
|
115
|
+
getStepsByMetaKey(metaKey: string | number | symbol): ExecutableStep[];
|
|
116
|
+
getStepsByStepClass<TClass extends ExecutableStep>(klass: {
|
|
117
|
+
new (...args: any[]): TClass;
|
|
118
|
+
}): TClass[];
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=OperationPlan.d.ts.map
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type LRU from "@graphile/lru";
|
|
2
|
+
import type { FieldNode, GraphQLEnumType, GraphQLObjectType, GraphQLScalarType } from "graphql";
|
|
3
|
+
import { GraphQLError } from "graphql";
|
|
4
|
+
import type { Bucket } from "../bucket.js";
|
|
5
|
+
import type { JSONValue, LocationDetails } from "../interfaces.js";
|
|
6
|
+
import type { ExecutableStep } from "../step.js";
|
|
7
|
+
import type { PayloadRoot } from "./executeOutputPlan.js";
|
|
8
|
+
import type { LayerPlan } from "./LayerPlan.js";
|
|
9
|
+
export declare type OutputPlanTypeIntrospection = {
|
|
10
|
+
mode: "introspection";
|
|
11
|
+
field: FieldNode;
|
|
12
|
+
variableNames: string[];
|
|
13
|
+
introspectionCacheByVariableValues: LRU<string, JSONValue>;
|
|
14
|
+
};
|
|
15
|
+
export declare type OutputPlanTypeRoot = {
|
|
16
|
+
mode: "root";
|
|
17
|
+
typeName: string;
|
|
18
|
+
};
|
|
19
|
+
export declare type OutputPlanTypeObject = {
|
|
20
|
+
mode: "object";
|
|
21
|
+
typeName: string;
|
|
22
|
+
deferLabel: string | undefined;
|
|
23
|
+
};
|
|
24
|
+
export declare type OutputPlanTypePolymorphicObject = {
|
|
25
|
+
mode: "polymorphic";
|
|
26
|
+
typeNames: string[];
|
|
27
|
+
deferLabel: string | undefined;
|
|
28
|
+
};
|
|
29
|
+
export declare type OutputPlanTypeArray = {
|
|
30
|
+
mode: "array";
|
|
31
|
+
};
|
|
32
|
+
export declare type OutputPlanTypeLeaf = {
|
|
33
|
+
mode: "leaf";
|
|
34
|
+
serialize: GraphQLScalarType["serialize"];
|
|
35
|
+
graphqlType: GraphQLScalarType | GraphQLEnumType;
|
|
36
|
+
};
|
|
37
|
+
export declare type OutputPlanTypeNull = {
|
|
38
|
+
mode: "null";
|
|
39
|
+
};
|
|
40
|
+
export declare type OutputPlanType = OutputPlanTypeRoot | OutputPlanTypeObject | OutputPlanTypePolymorphicObject | OutputPlanTypeLeaf | OutputPlanTypeNull | OutputPlanTypeArray | OutputPlanTypeIntrospection;
|
|
41
|
+
export declare type OutputPlanKeyValueOutputPlan = {
|
|
42
|
+
type: "outputPlan";
|
|
43
|
+
outputPlan: OutputPlan;
|
|
44
|
+
isNonNull: boolean;
|
|
45
|
+
locationDetails: LocationDetails;
|
|
46
|
+
};
|
|
47
|
+
export declare type OutputPlanKeyValueTypeName = {
|
|
48
|
+
type: "__typename";
|
|
49
|
+
locationDetails: LocationDetails;
|
|
50
|
+
};
|
|
51
|
+
export declare type OutputPlanKeyValue = OutputPlanKeyValueOutputPlan | OutputPlanKeyValueTypeName;
|
|
52
|
+
export declare type OutputPlanKeyValueOutputPlanWithCachedBits = OutputPlanKeyValueOutputPlan & {
|
|
53
|
+
layerPlanId: number;
|
|
54
|
+
};
|
|
55
|
+
export declare class OutputPlan<TType extends OutputPlanType = OutputPlanType> {
|
|
56
|
+
layerPlan: LayerPlan;
|
|
57
|
+
readonly type: TType;
|
|
58
|
+
readonly locationDetails: LocationDetails;
|
|
59
|
+
readonly rootStep: ExecutableStep;
|
|
60
|
+
private processRoot;
|
|
61
|
+
keys: {
|
|
62
|
+
[key: string]: OutputPlanKeyValueTypeName | OutputPlanKeyValueOutputPlanWithCachedBits;
|
|
63
|
+
};
|
|
64
|
+
child: OutputPlan | null;
|
|
65
|
+
childIsNonNull: boolean;
|
|
66
|
+
childByTypeName: {
|
|
67
|
+
[typeName: string]: OutputPlan<OutputPlanTypeObject>;
|
|
68
|
+
};
|
|
69
|
+
deferredOutputPlans: OutputPlan<OutputPlanTypeObject | OutputPlanTypePolymorphicObject>[];
|
|
70
|
+
constructor(layerPlan: LayerPlan, rootStep: ExecutableStep, type: TType, locationDetails: LocationDetails);
|
|
71
|
+
print(): string;
|
|
72
|
+
toString(): string;
|
|
73
|
+
addChild(type: GraphQLObjectType | null, key: string | null, child: OutputPlanKeyValue): void;
|
|
74
|
+
getLayerPlans(layerPlans?: Set<LayerPlan<import("./LayerPlan.js").LayerPlanReason>>): Set<LayerPlan>;
|
|
75
|
+
makeNextStepByLayerPlan(): Record<number, any[]>;
|
|
76
|
+
execute(this: OutputPlan, _root: PayloadRoot, _mutablePath: Array<string | number>, _bucket: Bucket, _bucketIndex: number): JSONValue;
|
|
77
|
+
executeString(this: OutputPlan, _root: PayloadRoot, _mutablePath: Array<string | number>, _bucket: Bucket, _bucketIndex: number): string;
|
|
78
|
+
optimize(): void;
|
|
79
|
+
finalize(): void;
|
|
80
|
+
}
|
|
81
|
+
export declare function coerceError(error: Error, locationDetails: LocationDetails, path: ReadonlyArray<string | number>): GraphQLError;
|
|
82
|
+
export declare function nonNullError(locationDetails: LocationDetails, path: readonly (string | number)[]): GraphQLError;
|
|
83
|
+
export declare function getChildBucketAndIndex(childOutputPlan: OutputPlan, outputPlan: OutputPlan | null, bucket: Bucket, bucketIndex: number, arrayIndex?: number | null): [Bucket, number] | null;
|
|
84
|
+
//# sourceMappingURL=OutputPlan.d.ts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { OperationPlan } from "../index.js";
|
|
2
|
+
import type { ExecutableStep } from "../step";
|
|
3
|
+
import type { LayerPlan, LayerPlanReasonsWithParentStep } from "./LayerPlan";
|
|
4
|
+
import type { OutputPlan } from "./OutputPlan";
|
|
5
|
+
export declare class StepTracker {
|
|
6
|
+
private readonly operationPlan;
|
|
7
|
+
stepCount: number;
|
|
8
|
+
activeSteps: Set<ExecutableStep<any>>;
|
|
9
|
+
stepById: {
|
|
10
|
+
[stepId: number]: ExecutableStep;
|
|
11
|
+
};
|
|
12
|
+
private aliasesById;
|
|
13
|
+
stepsWithNoDependencies: Set<ExecutableStep<any>>;
|
|
14
|
+
outputPlansByRootStep: Map<ExecutableStep<any>, Set<OutputPlan<import("./OutputPlan").OutputPlanType>>>;
|
|
15
|
+
layerPlansByRootStep: Map<ExecutableStep<any>, Set<LayerPlan<import("./LayerPlan").LayerPlanReason>>>;
|
|
16
|
+
layerPlansByParentStep: Map<ExecutableStep<any>, Set<LayerPlan<LayerPlanReasonsWithParentStep>>>;
|
|
17
|
+
layerPlans: Array<LayerPlan | null>;
|
|
18
|
+
allOutputPlans: OutputPlan[];
|
|
19
|
+
constructor(operationPlan: OperationPlan);
|
|
20
|
+
private assertPhaseNot;
|
|
21
|
+
addStep($step: ExecutableStep): number;
|
|
22
|
+
addLayerPlan(layerPlan: LayerPlan): number;
|
|
23
|
+
addOutputPlan(outputPlan: OutputPlan): void;
|
|
24
|
+
deleteLayerPlan(layerPlan: LayerPlan): void;
|
|
25
|
+
getStepById(id: number): ExecutableStep;
|
|
26
|
+
getStepById(id: number, allowUnset: true): ExecutableStep | null;
|
|
27
|
+
addStepDependency($dependent: ExecutableStep, $dependency: ExecutableStep): number;
|
|
28
|
+
setOutputPlanRootStep(outputPlan: OutputPlan, $dependency: ExecutableStep): void;
|
|
29
|
+
setLayerPlanRootStep(layerPlan: LayerPlan, $dependency: ExecutableStep): void;
|
|
30
|
+
replaceStep($original: ExecutableStep, $replacement: ExecutableStep): void;
|
|
31
|
+
treeShakeSteps(): void;
|
|
32
|
+
private isNotNeeded;
|
|
33
|
+
private eradicate;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=StepTracker.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Bucket, RequestContext } from "../bucket.js";
|
|
2
|
+
import type { PromiseOrDirect } from "../interfaces.js";
|
|
3
|
+
export declare function executeBucket(bucket: Bucket, requestContext: RequestContext): PromiseOrDirect<void>;
|
|
4
|
+
export declare function newBucket(spec: Pick<Bucket, "layerPlan" | "store" | "size" | "hasErrors" | "polymorphicPathList">): Bucket;
|
|
5
|
+
//# sourceMappingURL=executeBucket.d.ts.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { GraphQLError } from "graphql";
|
|
2
|
+
import type { Bucket, RequestContext } from "../bucket.js";
|
|
3
|
+
import type { JSONValue } from "../interfaces.js";
|
|
4
|
+
import type { OutputPlan } from "./OutputPlan.js";
|
|
5
|
+
export declare type OutputPath = Array<string | number>;
|
|
6
|
+
export interface OutputStream {
|
|
7
|
+
asyncIterable: AsyncIterableIterator<any>;
|
|
8
|
+
}
|
|
9
|
+
export interface PayloadRoot {
|
|
10
|
+
insideGraphQL: boolean;
|
|
11
|
+
errors: GraphQLError[];
|
|
12
|
+
queue: Array<SubsequentPayloadSpec>;
|
|
13
|
+
streams: Array<SubsequentStreamSpec>;
|
|
14
|
+
variables: {
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export interface OutputPlanContext {
|
|
19
|
+
requestContext: RequestContext;
|
|
20
|
+
root: PayloadRoot;
|
|
21
|
+
path: ReadonlyArray<string | number>;
|
|
22
|
+
}
|
|
23
|
+
export interface SubsequentPayloadSpec {
|
|
24
|
+
root: PayloadRoot;
|
|
25
|
+
path: ReadonlyArray<string | number>;
|
|
26
|
+
bucket: Bucket;
|
|
27
|
+
bucketIndex: number;
|
|
28
|
+
outputPlan: OutputPlan;
|
|
29
|
+
label: string | undefined;
|
|
30
|
+
}
|
|
31
|
+
export interface SubsequentStreamSpec {
|
|
32
|
+
root: PayloadRoot;
|
|
33
|
+
path: ReadonlyArray<string | number>;
|
|
34
|
+
bucket: Bucket;
|
|
35
|
+
bucketIndex: number;
|
|
36
|
+
outputPlan: OutputPlan;
|
|
37
|
+
label: string | undefined;
|
|
38
|
+
stream: AsyncIterableIterator<any>;
|
|
39
|
+
startIndex: number;
|
|
40
|
+
}
|
|
41
|
+
export declare function executeOutputPlan(ctx: OutputPlanContext, outputPlan: OutputPlan, bucket: Bucket, bucketIndex: number, asString: boolean): JSONValue;
|
|
42
|
+
//# sourceMappingURL=executeOutputPlan.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { LayerPlan } from "../LayerPlan";
|
|
2
|
+
export declare function withGlobalLayerPlan<T>(layerPlan: LayerPlan, polymorphicPaths: ReadonlySet<string>, callback: () => T): T;
|
|
3
|
+
export declare function currentLayerPlan(): LayerPlan;
|
|
4
|
+
export declare function currentPolymorphicPaths(): ReadonlySet<string>;
|
|
5
|
+
//# sourceMappingURL=withGlobalLayerPlan.d.ts.map
|