grafast 0.0.1-alpha.12 → 0.0.1-alpha.13
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/StepTracker.d.ts +3 -1
- package/dist/envelop.js +4 -4
- package/dist/establishOperationPlan.d.ts +3 -31
- package/dist/index.d.ts +5 -3
- package/dist/index.js +8 -6
- package/dist/input.d.ts +1 -1
- package/dist/interfaces.d.ts +84 -54
- package/dist/makeGrafastSchema.d.ts +3 -3
- package/dist/steps/access.d.ts +1 -0
- package/dist/steps/{deepEval.d.ts → applyTransforms.d.ts} +3 -3
- package/dist/steps/constant.d.ts +4 -3
- package/dist/steps/index.d.ts +1 -1
- package/dist/steps/node.d.ts +8 -12
- package/dist/version.d.ts +1 -1
- package/package.json +8 -1
package/dist/input.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ 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
|
-
export declare function
|
|
6
|
+
export declare function inputStep(operationPlan: OperationPlan, inputType: GraphQLInputType, rawInputValue: ValueNode | undefined, defaultValue?: ConstValueNode | undefined): AnyInputStep;
|
|
7
7
|
//# sourceMappingURL=input.d.ts.map
|
package/dist/interfaces.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import type LRU from "@graphile/lru";
|
|
1
2
|
import type EventEmitter from "eventemitter3";
|
|
2
3
|
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, ValueNode, VariableNode } from "graphql";
|
|
4
|
+
import type { ASTNode, DocumentNode, ExecutionArgs, FragmentDefinitionNode, GraphQLArgument, GraphQLArgumentConfig, GraphQLError, GraphQLField, GraphQLFieldConfig, GraphQLInputField, GraphQLInputFieldConfig, GraphQLInputObjectType, GraphQLInputType, GraphQLList, GraphQLNonNull, GraphQLOutputType, GraphQLScalarType, GraphQLSchema, GraphQLType, OperationDefinitionNode, ValueNode, VariableNode } from "graphql";
|
|
4
5
|
import type { Bucket, RequestTools } from "./bucket.js";
|
|
6
|
+
import type { OperationPlan } from "./engine/OperationPlan.js";
|
|
7
|
+
import type { SafeError } from "./error.js";
|
|
5
8
|
import type { ExecutableStep, ListCapableStep, ModifierStep } from "./step.js";
|
|
6
9
|
import type { __InputDynamicScalarStep } from "./steps/__inputDynamicScalar.js";
|
|
7
10
|
import type { __InputListStep, __InputObjectStepWithDollars, __InputStaticLeafStep, __TrackedValueStep, __TrackedValueStepWithDollars, ConstantStep } from "./steps/index.js";
|
|
@@ -12,16 +15,77 @@ export interface GrafastTimeouts {
|
|
|
12
15
|
execution?: number;
|
|
13
16
|
}
|
|
14
17
|
export interface GrafastOptions {
|
|
15
|
-
context?:
|
|
18
|
+
context?: Partial<Grafast.Context> | ((ctx: Partial<Grafast.RequestContext>, args: ExecutionArgs) => PromiseOrValue<Partial<Grafast.Context>>);
|
|
16
19
|
explain?: boolean | string[];
|
|
17
20
|
timeouts?: GrafastTimeouts;
|
|
18
21
|
}
|
|
22
|
+
export declare const $$queryCache: unique symbol;
|
|
23
|
+
export declare const $$cacheByOperation: unique symbol;
|
|
24
|
+
export type Fragments = {
|
|
25
|
+
[key: string]: FragmentDefinitionNode;
|
|
26
|
+
};
|
|
27
|
+
export type OperationPlanOrError = OperationPlan | Error | SafeError<{
|
|
28
|
+
[$$timeout]: number;
|
|
29
|
+
[$$ts]: number;
|
|
30
|
+
} | {
|
|
31
|
+
[$$timeout]?: undefined;
|
|
32
|
+
[$$ts]?: undefined;
|
|
33
|
+
} | undefined>;
|
|
34
|
+
export interface CacheByOperationEntry {
|
|
35
|
+
possibleOperationPlans: LinkedList<OperationPlanOrError> | null;
|
|
36
|
+
fragments: Fragments;
|
|
37
|
+
}
|
|
38
|
+
export interface LinkedList<T> {
|
|
39
|
+
value: T;
|
|
40
|
+
next: LinkedList<T> | null;
|
|
41
|
+
}
|
|
19
42
|
declare global {
|
|
20
43
|
namespace Grafast {
|
|
21
44
|
interface RequestContext {
|
|
22
45
|
}
|
|
23
46
|
interface Context {
|
|
24
47
|
}
|
|
48
|
+
interface FieldExtensions {
|
|
49
|
+
plan?: FieldPlanResolver<any, any, any>;
|
|
50
|
+
subscribePlan?: FieldPlanResolver<any, any, any>;
|
|
51
|
+
}
|
|
52
|
+
interface ArgumentExtensions {
|
|
53
|
+
inputPlan?: ArgumentInputPlanResolver;
|
|
54
|
+
applyPlan?: ArgumentApplyPlanResolver;
|
|
55
|
+
autoApplyAfterParentPlan?: boolean;
|
|
56
|
+
autoApplyAfterParentSubscribePlan?: boolean;
|
|
57
|
+
}
|
|
58
|
+
interface InputObjectTypeExtensions {
|
|
59
|
+
inputPlan?: InputObjectTypeInputPlanResolver;
|
|
60
|
+
}
|
|
61
|
+
interface InputFieldExtensions {
|
|
62
|
+
inputPlan?: InputObjectFieldInputPlanResolver;
|
|
63
|
+
applyPlan?: InputObjectFieldApplyPlanResolver;
|
|
64
|
+
autoApplyAfterParentInputPlan?: boolean;
|
|
65
|
+
autoApplyAfterParentApplyPlan?: boolean;
|
|
66
|
+
}
|
|
67
|
+
interface ObjectTypeExtensions {
|
|
68
|
+
assertStep?: ((step: ExecutableStep) => asserts step is ExecutableStep) | {
|
|
69
|
+
new (...args: any[]): ExecutableStep;
|
|
70
|
+
} | null;
|
|
71
|
+
}
|
|
72
|
+
interface EnumTypeExtensions {
|
|
73
|
+
}
|
|
74
|
+
interface EnumValueExtensions {
|
|
75
|
+
applyPlan?: EnumValueApplyPlanResolver<any>;
|
|
76
|
+
}
|
|
77
|
+
interface ScalarTypeExtensions {
|
|
78
|
+
plan?: ScalarPlanResolver;
|
|
79
|
+
inputPlan?: ScalarInputPlanResolver;
|
|
80
|
+
idempotent?: boolean;
|
|
81
|
+
}
|
|
82
|
+
interface SchemaExtensions {
|
|
83
|
+
queryCacheMaxLength?: number;
|
|
84
|
+
[$$queryCache]?: LRU<string, DocumentNode | ReadonlyArray<GraphQLError>>;
|
|
85
|
+
operationsCacheMaxLength?: number;
|
|
86
|
+
operationOperationPlansCacheMaxLength?: number;
|
|
87
|
+
[$$cacheByOperation]?: LRU<OperationDefinitionNode, CacheByOperationEntry>;
|
|
88
|
+
}
|
|
25
89
|
}
|
|
26
90
|
namespace GraphileConfig {
|
|
27
91
|
interface Preset {
|
|
@@ -41,64 +105,33 @@ declare global {
|
|
|
41
105
|
}
|
|
42
106
|
}
|
|
43
107
|
}
|
|
44
|
-
export interface GrafastFieldExtensions {
|
|
45
|
-
plan?: FieldPlanResolver<any, any, any>;
|
|
46
|
-
subscribePlan?: FieldPlanResolver<any, any, any>;
|
|
47
|
-
}
|
|
48
|
-
export interface GrafastArgumentExtensions {
|
|
49
|
-
inputPlan?: ArgumentInputPlanResolver;
|
|
50
|
-
applyPlan?: ArgumentApplyPlanResolver;
|
|
51
|
-
autoApplyAfterParentPlan?: boolean;
|
|
52
|
-
autoApplyAfterParentSubscribePlan?: boolean;
|
|
53
|
-
}
|
|
54
|
-
export interface GrafastInputObjectTypeExtensions {
|
|
55
|
-
inputPlan?: InputObjectTypeInputPlanResolver;
|
|
56
|
-
}
|
|
57
|
-
export interface GrafastInputFieldExtensions {
|
|
58
|
-
inputPlan?: InputObjectFieldInputPlanResolver;
|
|
59
|
-
applyPlan?: InputObjectFieldApplyPlanResolver;
|
|
60
|
-
autoApplyAfterParentInputPlan?: boolean;
|
|
61
|
-
autoApplyAfterParentApplyPlan?: boolean;
|
|
62
|
-
}
|
|
63
|
-
export interface GrafastObjectTypeExtensions {
|
|
64
|
-
assertStep?: ((step: ExecutableStep) => asserts step is ExecutableStep) | {
|
|
65
|
-
new (...args: any[]): ExecutableStep;
|
|
66
|
-
} | null;
|
|
67
|
-
}
|
|
68
|
-
export interface GrafastEnumTypeExtensions {
|
|
69
|
-
}
|
|
70
|
-
export interface GrafastEnumValueExtensions {
|
|
71
|
-
applyPlan?: EnumValueApplyPlanResolver<any>;
|
|
72
|
-
}
|
|
73
|
-
export interface GrafastScalarTypeExtensions {
|
|
74
|
-
plan?: ScalarPlanResolver;
|
|
75
|
-
inputPlan?: ScalarInputPlanResolver;
|
|
76
|
-
idempotent?: boolean;
|
|
77
|
-
}
|
|
78
108
|
declare module "graphql" {
|
|
79
109
|
interface GraphQLFieldExtensions<_TSource, _TContext, _TArgs = any> {
|
|
80
|
-
grafast?:
|
|
110
|
+
grafast?: Grafast.FieldExtensions;
|
|
81
111
|
}
|
|
82
112
|
interface GraphQLArgumentExtensions {
|
|
83
|
-
grafast?:
|
|
113
|
+
grafast?: Grafast.ArgumentExtensions;
|
|
84
114
|
}
|
|
85
115
|
interface GraphQLInputObjectTypeExtensions {
|
|
86
|
-
grafast?:
|
|
116
|
+
grafast?: Grafast.InputObjectTypeExtensions;
|
|
87
117
|
}
|
|
88
118
|
interface GraphQLInputFieldExtensions {
|
|
89
|
-
grafast?:
|
|
119
|
+
grafast?: Grafast.InputFieldExtensions;
|
|
90
120
|
}
|
|
91
121
|
interface GraphQLObjectTypeExtensions<_TSource = any, _TContext = any> {
|
|
92
|
-
grafast?:
|
|
122
|
+
grafast?: Grafast.ObjectTypeExtensions;
|
|
93
123
|
}
|
|
94
124
|
interface GraphQLEnumTypeExtensions {
|
|
95
|
-
grafast?:
|
|
125
|
+
grafast?: Grafast.EnumTypeExtensions;
|
|
96
126
|
}
|
|
97
127
|
interface GraphQLEnumValueExtensions {
|
|
98
|
-
grafast?:
|
|
128
|
+
grafast?: Grafast.EnumValueExtensions;
|
|
99
129
|
}
|
|
100
130
|
interface GraphQLScalarTypeExtensions {
|
|
101
|
-
grafast?:
|
|
131
|
+
grafast?: Grafast.ScalarTypeExtensions;
|
|
132
|
+
}
|
|
133
|
+
interface GraphQLSchemaExtensions {
|
|
134
|
+
grafast?: Grafast.SchemaExtensions;
|
|
102
135
|
}
|
|
103
136
|
}
|
|
104
137
|
export declare const $$grafastContext: unique symbol;
|
|
@@ -182,7 +215,7 @@ export type ScalarInputPlanResolver<TResultStep extends ExecutableStep = Executa
|
|
|
182
215
|
}) => TResultStep;
|
|
183
216
|
export type EnumValueApplyPlanResolver<TParentStep extends ExecutableStep | ModifierStep = ExecutableStep | ModifierStep> = ($parent: TParentStep) => ModifierStep | void;
|
|
184
217
|
type OutputPlanForNamedType<TType extends GraphQLType> = TType extends GrafastObjectType<any, infer TStep, any> ? TStep : ExecutableStep;
|
|
185
|
-
export type OutputPlanForType<TType extends GraphQLOutputType> = TType extends GraphQLNonNull<GraphQLList<GraphQLNonNull<infer U>>> ? ListCapableStep<any, OutputPlanForNamedType<U>> | ExecutableStep : TType extends GraphQLNonNull<GraphQLList<infer U>> ? ListCapableStep<any, OutputPlanForNamedType<U>> | ExecutableStep : TType extends GraphQLList<GraphQLNonNull<infer U>> ? ListCapableStep<any, OutputPlanForNamedType<U>> | ExecutableStep : TType extends GraphQLList<infer U> ? ListCapableStep<any, OutputPlanForNamedType<U>> | ExecutableStep : TType extends GraphQLNonNull<infer U> ? OutputPlanForNamedType<U> : OutputPlanForNamedType<TType>;
|
|
218
|
+
export type OutputPlanForType<TType extends GraphQLOutputType> = TType extends GraphQLNonNull<GraphQLList<GraphQLNonNull<infer U>>> ? ListCapableStep<any, OutputPlanForNamedType<U>> | ExecutableStep<ReadonlyArray<any>> : TType extends GraphQLNonNull<GraphQLList<infer U>> ? ListCapableStep<any, OutputPlanForNamedType<U>> | ExecutableStep<ReadonlyArray<any>> : TType extends GraphQLList<GraphQLNonNull<infer U>> ? ListCapableStep<any, OutputPlanForNamedType<U>> | ExecutableStep<ReadonlyArray<any>> : TType extends GraphQLList<infer U> ? ListCapableStep<any, OutputPlanForNamedType<U>> | ExecutableStep<ReadonlyArray<any>> : TType extends GraphQLNonNull<infer U> ? OutputPlanForNamedType<U> : OutputPlanForNamedType<TType>;
|
|
186
219
|
type InputPlanForNamedType<TType extends GraphQLType> = TType extends GrafastInputObjectType<any, infer U, any> ? U : ModifierStep<any>;
|
|
187
220
|
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>;
|
|
188
221
|
type InputTypeForNamedType<TType extends GraphQLType> = TType extends GraphQLScalarType<infer U> ? U : any;
|
|
@@ -231,19 +264,16 @@ export type GrafastSubscriber<TTopics extends {
|
|
|
231
264
|
subscribe<TTopic extends keyof TTopics = keyof TTopics>(topic: TTopic): PromiseOrDirect<AsyncIterableIterator<TTopics[TTopic]>>;
|
|
232
265
|
};
|
|
233
266
|
export interface NodeIdCodec<T = any> {
|
|
267
|
+
name: string;
|
|
234
268
|
encode(value: T): string | null;
|
|
235
269
|
decode(value: string): T;
|
|
236
270
|
}
|
|
237
|
-
export type NodeIdHandler<
|
|
238
|
-
[key: string]: NodeIdCodec<any>;
|
|
239
|
-
} = {
|
|
240
|
-
[key: string]: NodeIdCodec<any>;
|
|
241
|
-
}, TCodecName extends keyof TCodecs = keyof TCodecs, TNodeStep extends ExecutableStep = ExecutableStep, TSpec = any> = {
|
|
271
|
+
export type NodeIdHandler<TCodec extends NodeIdCodec<any> = NodeIdCodec<any>, TNodeStep extends ExecutableStep = ExecutableStep, TSpec = any> = {
|
|
242
272
|
typeName: string;
|
|
243
|
-
|
|
244
|
-
match(specifier:
|
|
245
|
-
plan($thing: TNodeStep): ExecutableStep<
|
|
246
|
-
getSpec(plan: ExecutableStep<
|
|
273
|
+
codec: TCodec;
|
|
274
|
+
match(specifier: TCodec extends NodeIdCodec<infer U> ? U : any): boolean;
|
|
275
|
+
plan($thing: TNodeStep): ExecutableStep<TCodec extends NodeIdCodec<infer U> ? U : any>;
|
|
276
|
+
getSpec(plan: ExecutableStep<TCodec extends NodeIdCodec<infer U> ? U : any>): TSpec;
|
|
247
277
|
get(spec: TSpec): TNodeStep;
|
|
248
278
|
deprecationReason?: string;
|
|
249
279
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { GraphQLFieldResolver, GraphQLScalarLiteralParser, GraphQLScalarSerializer, GraphQLScalarValueParser, GraphQLSchema } from "graphql";
|
|
2
|
-
import type { EnumValueApplyPlanResolver, FieldPlanResolver,
|
|
2
|
+
import type { EnumValueApplyPlanResolver, FieldPlanResolver, ScalarPlanResolver } from "./interfaces.js";
|
|
3
3
|
import type { ExecutableStep } from "./step.js";
|
|
4
4
|
export type FieldPlans = FieldPlanResolver<any, any, any> | {
|
|
5
5
|
plan?: FieldPlanResolver<any, any, any>;
|
|
@@ -7,7 +7,7 @@ export type FieldPlans = FieldPlanResolver<any, any, any> | {
|
|
|
7
7
|
resolve?: GraphQLFieldResolver<any, any>;
|
|
8
8
|
subscribe?: GraphQLFieldResolver<any, any>;
|
|
9
9
|
args?: {
|
|
10
|
-
[argName: string]:
|
|
10
|
+
[argName: string]: Grafast.ArgumentExtensions;
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
13
|
export type ObjectPlans = {
|
|
@@ -18,7 +18,7 @@ export type ObjectPlans = {
|
|
|
18
18
|
[fieldName: string]: FieldPlans;
|
|
19
19
|
};
|
|
20
20
|
export type InputObjectPlans = {
|
|
21
|
-
[fieldName: string]:
|
|
21
|
+
[fieldName: string]: Grafast.InputFieldExtensions;
|
|
22
22
|
};
|
|
23
23
|
export type InterfaceOrUnionPlans = {
|
|
24
24
|
__resolveType?: (o: unknown) => string;
|
package/dist/steps/access.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export declare class AccessStep<TData> extends UnbatchedExecutableStep<TData> {
|
|
|
16
16
|
get<TAttr extends keyof TData>(attrName: TAttr): AccessStep<TData[TAttr]>;
|
|
17
17
|
at<TIndex extends keyof TData>(index: TIndex): AccessStep<TData[TIndex]>;
|
|
18
18
|
optimize(): AccessStep<TData>;
|
|
19
|
+
finalize(): void;
|
|
19
20
|
unbatchedExecute(_extra: ExecutionExtra, ..._values: any[]): any;
|
|
20
21
|
deduplicate(peers: AccessStep<unknown>[]): AccessStep<TData>[];
|
|
21
22
|
}
|
|
@@ -4,7 +4,7 @@ import type { GrafastError } from "../error.js";
|
|
|
4
4
|
import type { ExecutionExtra, GrafastResultsList, GrafastValuesList } from "../interfaces.js";
|
|
5
5
|
import type { ListCapableStep } from "../step.js";
|
|
6
6
|
import { ExecutableStep } from "../step.js";
|
|
7
|
-
export declare class
|
|
7
|
+
export declare class ApplyTransformsStep extends ExecutableStep {
|
|
8
8
|
static $$export: {
|
|
9
9
|
moduleName: string;
|
|
10
10
|
exportName: string;
|
|
@@ -15,5 +15,5 @@ export declare class DeepEvalStep extends ExecutableStep {
|
|
|
15
15
|
constructor(listPlan: ListCapableStep<any, any>);
|
|
16
16
|
execute(_count: number, values: [GrafastValuesList<any[] | null | undefined | GrafastError>], extra: ExecutionExtra): Promise<GrafastResultsList<any[]>>;
|
|
17
17
|
}
|
|
18
|
-
export declare function
|
|
19
|
-
//# sourceMappingURL=
|
|
18
|
+
export declare function applyTransforms($step: ExecutableStep): ExecutableStep<any>;
|
|
19
|
+
//# sourceMappingURL=applyTransforms.d.ts.map
|
package/dist/steps/constant.d.ts
CHANGED
|
@@ -2,12 +2,13 @@ import type { GrafastResultsList } from "../interfaces.js";
|
|
|
2
2
|
import { UnbatchedExecutableStep } from "../step.js";
|
|
3
3
|
export declare class ConstantStep<TData> extends UnbatchedExecutableStep<TData> {
|
|
4
4
|
readonly data: TData;
|
|
5
|
+
readonly isSensitive: boolean;
|
|
5
6
|
static $$export: {
|
|
6
7
|
moduleName: string;
|
|
7
8
|
exportName: string;
|
|
8
9
|
};
|
|
9
10
|
isSyncAndSafe: boolean;
|
|
10
|
-
constructor(data: TData);
|
|
11
|
+
constructor(data: TData, isSensitive?: boolean);
|
|
11
12
|
toStringMeta(): string;
|
|
12
13
|
deduplicate(peers: readonly ConstantStep<any>[]): ConstantStep<any>[];
|
|
13
14
|
execute(count: number): GrafastResultsList<TData>;
|
|
@@ -18,6 +19,6 @@ export declare class ConstantStep<TData> extends UnbatchedExecutableStep<TData>
|
|
|
18
19
|
isNull(): boolean;
|
|
19
20
|
isUndefined(): boolean;
|
|
20
21
|
}
|
|
21
|
-
export declare function constant(strings: TemplateStringsArray & [
|
|
22
|
-
export declare function constant<TData>(data: TData): ConstantStep<TData>;
|
|
22
|
+
export declare function constant<const TString extends string>(strings: TemplateStringsArray & [TString]): ConstantStep<TString>;
|
|
23
|
+
export declare function constant<TData>(data: TData, isSecret?: boolean): ConstantStep<TData>;
|
|
23
24
|
//# sourceMappingURL=constant.d.ts.map
|
package/dist/steps/index.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export { __InputStaticLeafStep } from "./__inputStaticLeaf.js";
|
|
|
28
28
|
export { __ItemStep } from "./__item.js";
|
|
29
29
|
export { __TrackedValueStep, __TrackedValueStepWithDollars, } from "./__trackedValue.js";
|
|
30
30
|
export { __ValueStep } from "./__value.js";
|
|
31
|
-
export {
|
|
31
|
+
export { applyTransforms, ApplyTransformsStep } from "./applyTransforms.js";
|
|
32
32
|
export { GraphQLItemHandler, graphqlItemHandler, graphqlResolver, GraphQLResolverStep, } from "./graphqlResolver.js";
|
|
33
33
|
export { LoadedRecordStep, loadMany, LoadManyCallback, loadManyCallback, loadOne, LoadOneCallback, loadOneCallback, LoadOptions, LoadStep, } from "./load.js";
|
|
34
34
|
export { proxy, ProxyStep } from "./proxy.js";
|
package/dist/steps/node.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import type { GraphQLObjectType } from "graphql";
|
|
2
|
-
import type { ExecutionExtra,
|
|
2
|
+
import type { ExecutionExtra, NodeIdHandler, PolymorphicData } from "../interfaces.js";
|
|
3
3
|
import type { ExecutableStep, PolymorphicStep } from "../step.js";
|
|
4
4
|
import { UnbatchedExecutableStep } from "../step.js";
|
|
5
|
-
export declare class NodeStep
|
|
6
|
-
[key: string]: NodeIdCodec<any>;
|
|
7
|
-
}> extends UnbatchedExecutableStep implements PolymorphicStep {
|
|
5
|
+
export declare class NodeStep extends UnbatchedExecutableStep implements PolymorphicStep {
|
|
8
6
|
private possibleTypes;
|
|
9
7
|
static $$export: {
|
|
10
8
|
moduleName: string;
|
|
@@ -13,17 +11,15 @@ export declare class NodeStep<TCodecs extends {
|
|
|
13
11
|
isSyncAndSafe: boolean;
|
|
14
12
|
allowMultipleOptimizations: boolean;
|
|
15
13
|
private specPlanDep;
|
|
16
|
-
constructor(
|
|
17
|
-
[typeName: string]: NodeIdHandler
|
|
14
|
+
constructor(possibleTypes: {
|
|
15
|
+
[typeName: string]: NodeIdHandler;
|
|
18
16
|
}, $id: ExecutableStep<string>);
|
|
19
17
|
planForType(type: GraphQLObjectType): ExecutableStep;
|
|
20
18
|
private getTypeNameFromSpecifier;
|
|
21
19
|
unbatchedExecute: (_extra: ExecutionExtra, specifier: any) => PolymorphicData<string, ReadonlyArray<any>> | null;
|
|
22
20
|
}
|
|
23
|
-
export declare function node
|
|
24
|
-
[
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
}, $id: ExecutableStep<string>): NodeStep<TCodecs>;
|
|
28
|
-
export declare function specFromNodeId(codec: NodeIdCodec<any>, handler: NodeIdHandler<any>, $id: ExecutableStep<string>): any;
|
|
21
|
+
export declare function node(possibleTypes: {
|
|
22
|
+
[typeName: string]: NodeIdHandler;
|
|
23
|
+
}, $id: ExecutableStep<string>): NodeStep;
|
|
24
|
+
export declare function specFromNodeId(handler: NodeIdHandler<any>, $id: ExecutableStep<string>): any;
|
|
29
25
|
//# sourceMappingURL=node.d.ts.map
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "0.0.1-alpha.
|
|
1
|
+
export declare const version = "0.0.1-alpha.13";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "grafast",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.13",
|
|
4
4
|
"description": "Cutting edge GraphQL planning and execution engine",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -14,6 +14,11 @@
|
|
|
14
14
|
"types": "./dist/envelop.d.ts",
|
|
15
15
|
"node": "./dist/envelop.js",
|
|
16
16
|
"default": "./dist/envelop.js"
|
|
17
|
+
},
|
|
18
|
+
"./graphql": {
|
|
19
|
+
"types": "./fwd/graphql/index.d.ts",
|
|
20
|
+
"node": "./fwd/graphql/index.js",
|
|
21
|
+
"default": "./fwd/graphql/index.js"
|
|
17
22
|
}
|
|
18
23
|
},
|
|
19
24
|
"repository": {
|
|
@@ -47,6 +52,7 @@
|
|
|
47
52
|
"dependencies": {
|
|
48
53
|
"@graphile/lru": "^5.0.0-alpha.2",
|
|
49
54
|
"debug": "^4.3.3",
|
|
55
|
+
"graphql": "^16.1.0-experimental-stream-defer.6",
|
|
50
56
|
"tamedevil": "^0.0.0-alpha.4"
|
|
51
57
|
},
|
|
52
58
|
"peerDependencies": {
|
|
@@ -64,6 +70,7 @@
|
|
|
64
70
|
}
|
|
65
71
|
},
|
|
66
72
|
"files": [
|
|
73
|
+
"fwd",
|
|
67
74
|
"dist"
|
|
68
75
|
],
|
|
69
76
|
"publishConfig": {
|