grafast 0.0.1-0.2 → 0.0.1-0.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/dist/LICENSES.txt +27 -0
- package/dist/args.d.ts +1 -1
- package/dist/config.d.ts +12 -2
- package/dist/constraints.d.ts +1 -1
- package/dist/engine/LayerPlan.d.ts +6 -4
- package/dist/engine/OperationPlan.d.ts +2 -4
- package/dist/engine/OutputPlan.d.ts +12 -12
- package/dist/engine/executeOutputPlan.d.ts +2 -2
- package/dist/envelop.js +54 -1
- package/dist/error.d.ts +9 -0
- package/dist/establishOperationPlan.d.ts +19 -3
- package/dist/execute.d.ts +2 -2
- package/dist/grafastGraphql.d.ts +2 -2
- package/dist/index.d.ts +6 -6
- package/dist/index.js +8 -13
- package/dist/input.d.ts +1 -1
- package/dist/interfaces.d.ts +48 -44
- package/dist/makeGrafastSchema.d.ts +7 -7
- package/dist/polymorphic.d.ts +1 -1
- package/dist/prepare.d.ts +9 -2
- package/dist/step.d.ts +3 -3
- package/dist/steps/connection.d.ts +1 -1
- package/dist/steps/filter.d.ts +1 -1
- package/dist/steps/graphqlResolver.d.ts +12 -18
- package/dist/steps/groupBy.d.ts +1 -1
- package/dist/steps/index.d.ts +2 -3
- package/dist/steps/lambda.d.ts +4 -4
- package/dist/steps/list.d.ts +1 -1
- package/dist/steps/listTransform.d.ts +2 -2
- package/dist/steps/listen.d.ts +2 -2
- package/dist/steps/loadMany.d.ts +4 -3
- package/dist/steps/loadOne.d.ts +1 -1
- package/dist/steps/map.d.ts +1 -1
- package/dist/steps/node.d.ts +0 -1
- package/dist/steps/object.d.ts +3 -3
- package/dist/steps/proxy.d.ts +6 -0
- package/dist/stringifyPayload.d.ts +1 -1
- package/dist/subscribe.d.ts +1 -1
- package/dist/utils.d.ts +21 -17
- package/package.json +10 -4
package/dist/steps/proxy.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { GrafastResultsList, GrafastValuesList } from "../index.js";
|
|
2
2
|
import type { ExecutionExtra } from "../interfaces.js";
|
|
3
|
+
import { $$proxy } from "../interfaces.js";
|
|
3
4
|
import type { ExecutableStep } from "../step.js";
|
|
4
5
|
import { UnbatchedExecutableStep } from "../step.js";
|
|
5
6
|
export declare class ProxyStep<T> extends UnbatchedExecutableStep<T> {
|
|
@@ -16,6 +17,11 @@ export declare class ProxyStep<T> extends UnbatchedExecutableStep<T> {
|
|
|
16
17
|
unbatchedExecute(extra: ExecutionExtra, value: T): T;
|
|
17
18
|
stream: undefined;
|
|
18
19
|
}
|
|
20
|
+
declare module "../step.js" {
|
|
21
|
+
interface ExecutableStep {
|
|
22
|
+
[$$proxy]?: any;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
19
25
|
export declare function proxy<TData, TStep extends ExecutableStep<TData>>($step: TStep, $actualDep?: ExecutableStep): TStep & {
|
|
20
26
|
addDependency(step: ExecutableStep): number;
|
|
21
27
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { JSONObject } from "./interfaces.js";
|
|
2
|
-
export declare function stringifyPayload(payload: JSONObject,
|
|
2
|
+
export declare function stringifyPayload(payload: JSONObject, outputDataAsString: boolean | undefined): string;
|
|
3
3
|
//# sourceMappingURL=stringifyPayload.d.ts.map
|
package/dist/subscribe.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { AsyncExecutionResult, ExecutionArgs, ExecutionResult } from "graphql";
|
|
2
2
|
import type { PromiseOrValue } from "graphql/jsutils/PromiseOrValue";
|
|
3
|
-
export declare function subscribe(args: ExecutionArgs, resolvedPreset?: GraphileConfig.ResolvedPreset,
|
|
3
|
+
export declare function subscribe(args: ExecutionArgs, resolvedPreset?: GraphileConfig.ResolvedPreset, outputDataAsString?: boolean): PromiseOrValue<AsyncGenerator<ExecutionResult | AsyncExecutionResult, void, void> | ExecutionResult>;
|
|
4
4
|
//# sourceMappingURL=subscribe.d.ts.map
|
package/dist/utils.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { GraphQLEnumType, GraphQLInputObjectType, GraphQLObjectType } from "grap
|
|
|
3
3
|
import type { Deferred } from "./deferred.js";
|
|
4
4
|
import type { OperationPlan } from "./engine/OperationPlan.js";
|
|
5
5
|
import type { InputStep } from "./input.js";
|
|
6
|
-
import type { BaseGraphQLArguments,
|
|
6
|
+
import type { BaseGraphQLArguments, GraphileFieldConfig, GraphileInputFieldConfig, OutputPlanForType } from "./interfaces.js";
|
|
7
7
|
import type { ExecutableStep, ModifierStep } from "./step.js";
|
|
8
8
|
export declare const ROOT_VALUE_OBJECT: any;
|
|
9
9
|
export declare function assertNullPrototype(object: Record<string, unknown>, description: string): void;
|
|
@@ -12,38 +12,44 @@ export declare function isPromise<T>(t: T | Promise<T>): t is Promise<T>;
|
|
|
12
12
|
export declare function isPromiseLike<T>(t: T | Promise<T> | PromiseLike<T>): t is PromiseLike<T>;
|
|
13
13
|
export declare function isDeferred<T>(t: T | Promise<T> | Deferred<T>): t is Deferred<T>;
|
|
14
14
|
export declare function arraysMatch<T>(array1: ReadonlyArray<T>, array2: ReadonlyArray<T>, comparator?: (val1: T, val2: T) => boolean): boolean;
|
|
15
|
-
export
|
|
15
|
+
export type ObjectTypeFields<TContext extends Grafast.Context, TParentStep extends ExecutableStep<any>> = {
|
|
16
16
|
[key: string]: GraphileFieldConfig<GraphQLOutputType, TContext, TParentStep, any, any>;
|
|
17
17
|
};
|
|
18
|
-
export
|
|
18
|
+
export type ObjectTypeSpec<TContext extends Grafast.Context, TParentStep extends ExecutableStep<any>, TFields extends ObjectTypeFields<TContext, TParentStep>> = Omit<GraphQLObjectTypeConfig<any, TContext>, "fields"> & {
|
|
19
19
|
fields: TFields | (() => TFields);
|
|
20
20
|
};
|
|
21
|
-
export declare function objectSpec<TContext extends
|
|
21
|
+
export declare function objectSpec<TContext extends Grafast.Context, TParentStep extends ExecutableStep<any>, TFields extends ObjectTypeFields<TContext, TParentStep>>(spec: ObjectTypeSpec<TContext, TParentStep, TFields>, Step: {
|
|
22
22
|
new (...args: any[]): TParentStep;
|
|
23
23
|
} | null): GraphQLObjectTypeConfig<any, TContext>;
|
|
24
|
-
export
|
|
24
|
+
export type GraphileObjectType<TContext extends Grafast.Context, TParentStep extends ExecutableStep<any>, TFields extends ObjectTypeFields<TContext, TParentStep>> = GraphQLObjectType<TParentStep extends ExecutableStep<infer U> ? U : never, TContext> & {
|
|
25
25
|
TParentStep: TParentStep;
|
|
26
26
|
TFields: TFields;
|
|
27
27
|
};
|
|
28
|
-
export declare function newObjectTypeBuilder<TContext extends
|
|
28
|
+
export declare function newObjectTypeBuilder<TContext extends Grafast.Context, TParentStep extends ExecutableStep<any>>(Step: {
|
|
29
29
|
new (...args: any[]): TParentStep;
|
|
30
30
|
}): <TFields extends ObjectTypeFields<TContext, TParentStep>>(spec: ObjectTypeSpec<TContext, TParentStep, TFields>) => GraphileObjectType<TContext, TParentStep, TFields>;
|
|
31
|
-
export declare function objectFieldSpec<TContext extends
|
|
32
|
-
export declare function newGraphileFieldConfigBuilder<TContext extends
|
|
33
|
-
export
|
|
31
|
+
export declare function objectFieldSpec<TContext extends Grafast.Context, TSource extends ExecutableStep<any>, TResult extends ExecutableStep<any> = ExecutableStep<any>, TArgs extends BaseGraphQLArguments = BaseGraphQLArguments>(graphileSpec: GraphileFieldConfig<GraphQLOutputType, TContext, TSource, TResult, TArgs>): GraphQLFieldConfig<any, TContext, TArgs>;
|
|
32
|
+
export declare function newGraphileFieldConfigBuilder<TContext extends Grafast.Context, TParentStep extends ExecutableStep<any>>(): <TType extends GraphQLOutputType, TFieldStep extends OutputPlanForType<TType>, TArgs extends BaseGraphQLArguments>(config: GraphileFieldConfig<TType, TContext, TParentStep, TFieldStep, TArgs>) => typeof config;
|
|
33
|
+
export type GraphileInputFieldConfigMap<TContext extends Grafast.Context, TParentStep extends ModifierStep<any>> = {
|
|
34
34
|
[key: string]: GraphileInputFieldConfig<GraphQLInputType, TContext, TParentStep, any, any>;
|
|
35
35
|
};
|
|
36
|
-
export
|
|
36
|
+
export type InputObjectTypeSpec<TContext extends Grafast.Context, TParentStep extends ModifierStep<any>, TFields extends GraphileInputFieldConfigMap<TContext, TParentStep>> = Omit<GraphQLInputObjectTypeConfig, "fields"> & {
|
|
37
37
|
fields: TFields | (() => TFields);
|
|
38
38
|
};
|
|
39
|
-
export
|
|
39
|
+
export type GraphileInputObjectType<TContext extends Grafast.Context, TParentStep extends ModifierStep<any>, TFields extends GraphileInputFieldConfigMap<TContext, TParentStep>> = GraphQLInputObjectType & {
|
|
40
40
|
TContext: TContext;
|
|
41
41
|
TParentStep: TParentStep;
|
|
42
42
|
TFields: TFields;
|
|
43
43
|
};
|
|
44
|
-
export declare function newInputObjectTypeBuilder<TContext extends
|
|
45
|
-
export declare function inputObjectFieldSpec<TContext extends
|
|
46
|
-
|
|
44
|
+
export declare function newInputObjectTypeBuilder<TContext extends Grafast.Context, TParentStep extends ModifierStep<any>>(): <TFields extends GraphileInputFieldConfigMap<TContext, TParentStep>>(spec: InputObjectTypeSpec<TContext, TParentStep, TFields>) => GraphileInputObjectType<TContext, TParentStep, TFields>;
|
|
45
|
+
export declare function inputObjectFieldSpec<TContext extends Grafast.Context, TParent extends ModifierStep<any>, TResult extends ModifierStep<TParent> = ModifierStep<TParent>, TInput extends InputStep = InputStep>(graphileSpec: GraphileInputFieldConfig<GraphQLInputType, TContext, TParent, TResult, TInput>): GraphQLInputFieldConfig;
|
|
46
|
+
declare module "graphql" {
|
|
47
|
+
interface GraphQLEnumType {
|
|
48
|
+
[$$valueConfigByValue]?: Record<string, GraphQLEnumValueConfig>;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
declare const $$valueConfigByValue: unique symbol;
|
|
52
|
+
export declare function getEnumValueConfig(enumType: GraphQLEnumType, outputValue: string): GraphQLEnumValueConfig | undefined;
|
|
47
53
|
export declare const sharedNull: any;
|
|
48
54
|
export declare function stack(message: string, length?: number): void;
|
|
49
55
|
export declare function arrayOfLength(length: number, fill?: any): any[];
|
|
@@ -54,7 +60,5 @@ export declare function stepADependsOnStepB(stepA: ExecutableStep, stepB: Execut
|
|
|
54
60
|
export declare function stepAMayDependOnStepB($a: ExecutableStep, $b: ExecutableStep): boolean;
|
|
55
61
|
export declare function stepsAreInSamePhase(ancestor: ExecutableStep, descendent: ExecutableStep): boolean;
|
|
56
62
|
export declare const canonicalJSONStringify: (o: object) => string;
|
|
57
|
-
export
|
|
58
|
-
export declare const canRepresentAsIdentifier: (key: string) => boolean;
|
|
59
|
-
export declare const evalSafeProperty: (key: string) => string;
|
|
63
|
+
export {};
|
|
60
64
|
//# sourceMappingURL=utils.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "grafast",
|
|
3
|
-
"version": "0.0.1-0.
|
|
3
|
+
"version": "0.0.1-0.21",
|
|
4
4
|
"description": "Cutting edge GraphQL planning and execution engine",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -45,13 +45,19 @@
|
|
|
45
45
|
"node": ">=14.17"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@graphile/lru": "^5.0.0-0.1"
|
|
48
|
+
"@graphile/lru": "^5.0.0-0.1",
|
|
49
|
+
"debug": "^4.3.3",
|
|
50
|
+
"tamedevil": "^0.0.0-0.4"
|
|
49
51
|
},
|
|
50
52
|
"peerDependencies": {
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
+
"@envelop/core": "^3.0.4",
|
|
54
|
+
"graphile-config": "^0.0.1-0.5",
|
|
55
|
+
"graphql": "^16.1.0-experimental-stream-defer.6"
|
|
53
56
|
},
|
|
54
57
|
"peerDependenciesMeta": {
|
|
58
|
+
"@envelop/core": {
|
|
59
|
+
"optional": true
|
|
60
|
+
},
|
|
55
61
|
"graphile-config": {
|
|
56
62
|
"optional": true
|
|
57
63
|
}
|