grafast 0.1.1-beta.11 → 0.1.1-beta.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.
Files changed (41) hide show
  1. package/README.md +0 -3
  2. package/dist/args.js +8 -2
  3. package/dist/constraints.d.ts +15 -1
  4. package/dist/constraints.js +40 -1
  5. package/dist/engine/LayerPlan.d.ts +1 -0
  6. package/dist/engine/LayerPlan.js +62 -9
  7. package/dist/engine/OperationPlan.js +372 -274
  8. package/dist/engine/OutputPlan.d.ts +6 -5
  9. package/dist/engine/OutputPlan.js +423 -444
  10. package/dist/engine/executeBucket.js +36 -77
  11. package/dist/error.d.ts +13 -0
  12. package/dist/grafastGraphql.d.ts +5 -5
  13. package/dist/graphqlCollectFields.d.ts +6 -0
  14. package/dist/graphqlCollectFields.js +14 -8
  15. package/dist/interfaces.d.ts +18 -0
  16. package/dist/interfaces.js +0 -2
  17. package/dist/mermaid.js +20 -11
  18. package/dist/operationPlan-input.js +8 -1
  19. package/dist/planJSONInterfaces.d.ts +2 -0
  20. package/dist/prepare.js +3 -3
  21. package/dist/step.d.ts +5 -5
  22. package/dist/step.js +53 -2
  23. package/dist/steps/__flag.d.ts +3 -2
  24. package/dist/steps/__inputObject.d.ts +1 -0
  25. package/dist/steps/__inputObject.js +36 -0
  26. package/dist/steps/__item.d.ts +3 -3
  27. package/dist/steps/__trackedValue.d.ts +8 -0
  28. package/dist/steps/__trackedValue.js +40 -0
  29. package/dist/steps/__value.d.ts +2 -1
  30. package/dist/steps/constant.d.ts +2 -0
  31. package/dist/steps/constant.js +12 -0
  32. package/dist/steps/graphqlResolver.js +8 -5
  33. package/dist/steps/listen.d.ts +2 -2
  34. package/dist/steps/object.d.ts +1 -1
  35. package/dist/steps/sideEffect.d.ts +0 -1
  36. package/dist/thereCanBeOnlyOne.js +1 -1
  37. package/dist/utils.d.ts +4 -0
  38. package/dist/utils.js +7 -0
  39. package/dist/version.d.ts +1 -1
  40. package/dist/version.js +1 -1
  41. package/package.json +1 -1
@@ -2,7 +2,7 @@ import LRU from "@graphile/lru";
2
2
  import type { FieldNode, GraphQLEnumType, GraphQLObjectType, GraphQLScalarType } from "graphql";
3
3
  import * as graphql from "graphql";
4
4
  import type { Bucket } from "../bucket.js";
5
- import type { JSONValue, LocationDetails } from "../interfaces.js";
5
+ import type { ExecutionEntryFlags, JSONValue, LocationDetails } from "../interfaces.js";
6
6
  import type { ExecutableStep } from "../step.js";
7
7
  import type { PayloadRoot } from "./executeOutputPlan.js";
8
8
  import type { LayerPlan } from "./LayerPlan.js";
@@ -117,9 +117,10 @@ export declare class OutputPlan<TType extends OutputPlanType = OutputPlanType> {
117
117
  */
118
118
  readonly rootStep: ExecutableStep;
119
119
  /**
120
- * Appended to the root step when accessed to avoid the need for AccessSteps
120
+ * If this output plan should resolve to an error if a side effect step
121
+ * raises an error, this is that side effect.
121
122
  */
122
- private processRoot;
123
+ readonly sideEffectStep: ExecutableStep | null;
123
124
  /**
124
125
  * For root/object output plans, the keys to set on the resulting object
125
126
  * grouped by the concrete object type name.
@@ -165,8 +166,8 @@ export declare class OutputPlan<TType extends OutputPlanType = OutputPlanType> {
165
166
  addChild(type: GraphQLObjectType | null, key: string | null, child: OutputPlanKeyValue): void;
166
167
  getLayerPlans(layerPlans?: Set<LayerPlan<import("./LayerPlan.js").LayerPlanReason>>): Set<LayerPlan>;
167
168
  makeNextStepByLayerPlan(): Record<number, any[]>;
168
- execute(this: OutputPlan, _root: PayloadRoot, _mutablePath: Array<string | number>, _bucket: Bucket, _bucketIndex: number): JSONValue;
169
- executeString(this: OutputPlan, _root: PayloadRoot, _mutablePath: Array<string | number>, _bucket: Bucket, _bucketIndex: number): string;
169
+ execute(this: OutputPlan, _root: PayloadRoot, _mutablePath: ReadonlyArray<string | number>, _bucket: Bucket, _bucketIndex: number, _rawBucketRootValue?: any, _bucketRootFlags?: ExecutionEntryFlags): JSONValue;
170
+ executeString(this: OutputPlan, _root: PayloadRoot, _mutablePath: ReadonlyArray<string | number>, _bucket: Bucket, _bucketIndex: number, _rawBucketRootValue?: any, _bucketRootFlags?: ExecutionEntryFlags): string;
170
171
  optimize(): void;
171
172
  finalize(): void;
172
173
  }