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.
@@ -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, asString: boolean | undefined): string;
2
+ export declare function stringifyPayload(payload: JSONObject, outputDataAsString: boolean | undefined): string;
3
3
  //# sourceMappingURL=stringifyPayload.d.ts.map
@@ -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, asString?: boolean): PromiseOrValue<AsyncGenerator<ExecutionResult | AsyncExecutionResult, void, void> | ExecutionResult>;
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, BaseGraphQLContext, GraphileFieldConfig, GraphileInputFieldConfig, OutputPlanForType } from "./interfaces.js";
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 declare type ObjectTypeFields<TContext extends BaseGraphQLContext, TParentStep extends ExecutableStep<any>> = {
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 declare type ObjectTypeSpec<TContext extends BaseGraphQLContext, TParentStep extends ExecutableStep<any>, TFields extends ObjectTypeFields<TContext, TParentStep>> = Omit<GraphQLObjectTypeConfig<any, TContext>, "fields"> & {
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 BaseGraphQLContext, TParentStep extends ExecutableStep<any>, TFields extends ObjectTypeFields<TContext, TParentStep>>(spec: ObjectTypeSpec<TContext, TParentStep, TFields>, Step: {
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 declare type GraphileObjectType<TContext extends BaseGraphQLContext, TParentStep extends ExecutableStep<any>, TFields extends ObjectTypeFields<TContext, TParentStep>> = GraphQLObjectType<TParentStep extends ExecutableStep<infer U> ? U : never, TContext> & {
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 BaseGraphQLContext, TParentStep extends ExecutableStep<any>>(Step: {
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 BaseGraphQLContext, 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 BaseGraphQLContext, 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 declare type GraphileInputFieldConfigMap<TContext extends BaseGraphQLContext, TParentStep extends ModifierStep<any>> = {
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 declare type InputObjectTypeSpec<TContext extends BaseGraphQLContext, TParentStep extends ModifierStep<any>, TFields extends GraphileInputFieldConfigMap<TContext, TParentStep>> = Omit<GraphQLInputObjectTypeConfig, "fields"> & {
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 declare type GraphileInputObjectType<TContext extends BaseGraphQLContext, TParentStep extends ModifierStep<any>, TFields extends GraphileInputFieldConfigMap<TContext, TParentStep>> = GraphQLInputObjectType & {
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 BaseGraphQLContext, 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 BaseGraphQLContext, TParent extends ModifierStep<any>, TResult extends ModifierStep<TParent> = ModifierStep<TParent>, TInput extends InputStep = InputStep>(graphileSpec: GraphileInputFieldConfig<GraphQLInputType, TContext, TParent, TResult, TInput>): GraphQLInputFieldConfig;
46
- export declare function getEnumValueConfig(enumType: GraphQLEnumType, outputValue: unknown): GraphQLEnumValueConfig | undefined;
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 declare const isSafeObjectPropertyName: (key: string) => boolean;
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.2",
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
- "graphile-config": "^0.0.1-0.0",
52
- "graphql": "*"
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
  }