UNPKG

grafast

Version:

Cutting edge GraphQL planning and execution engine

79 lines 4.23 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FORBIDDEN_BY_NULLABLE_BOUNDARY_FLAGS = exports.DEFAULT_FORBIDDEN_FLAGS = exports.TRAPPABLE_FLAGS = exports.DEFAULT_ACCEPT_FLAGS = exports.ALL_FLAGS = exports.FLAG_STOPPED = exports.FLAG_POLY_SKIPPED = exports.FLAG_INHIBITED = exports.FLAG_NULL = exports.FLAG_ERROR = exports.NO_FLAGS = exports.$$contextPlanCache = exports.$$cacheByOperation = exports.$$queryCache = exports.$$deepDepSkip = exports.$$ts = exports.$$timeout = exports.$$subroutine = exports.$$safeError = exports.$$proxy = exports.$$streamMore = exports.$$eventEmitter = exports.$$idempotent = exports.$$extensions = exports.$$data = exports.$$bypassGraphQL = exports.$$verbatim = exports.$$id = exports.$$planResults = exports.$$grafastContext = exports.$$hooked = void 0; exports.$$hooked = Symbol("hookArgsApplied"); exports.$$grafastContext = Symbol("context"); exports.$$planResults = Symbol("planResults"); exports.$$id = Symbol("id"); /** Return the value verbatim, don't execute */ exports.$$verbatim = Symbol("verbatim"); /** * If we're sure the data is the right shape and valid, we can set this key and * it can be returned directly */ exports.$$bypassGraphQL = Symbol("bypassGraphQL"); exports.$$data = Symbol("data"); /** * For attaching additional metadata to the GraphQL execution result, for * example details of the plan or SQL queries or similar that were executed. */ exports.$$extensions = Symbol("extensions"); /** * Set this key on a type if that type's serialization is idempotent (that is * to say `serialize(serialize(thing)) === serialize(thing)`). This means we * don't have to "roll-back" serialization if we need to fallback to graphql-js * execution. */ exports.$$idempotent = Symbol("idempotent"); /** * The event emitter used for outputting execution events. */ exports.$$eventEmitter = Symbol("executionEventEmitter"); /** * Used to indicate that an array has more results available via a stream. */ exports.$$streamMore = Symbol("streamMore"); exports.$$proxy = Symbol("proxy"); /** * If an error has this property set then it's safe to send through to the user * without being masked. */ exports.$$safeError = Symbol("safeError"); /** The layerPlan used as a subroutine for this step */ exports.$$subroutine = Symbol("subroutine"); /** For tracking the timeout a TimeoutError happened from */ exports.$$timeout = Symbol("timeout"); /** For tracking _when_ the timeout happened (because once the JIT has warmed it might not need so long) */ exports.$$ts = Symbol("timestamp"); /** * @internal */ exports.$$deepDepSkip = Symbol("deepDepSkip_experimental"); exports.$$queryCache = Symbol("queryCache"); /** * We store the cache directly onto the GraphQLSchema so that it gets garbage * collected along with the schema when it's not needed any more. To do so, we * attach it using this symbol. */ exports.$$cacheByOperation = Symbol("cacheByOperation"); exports.$$contextPlanCache = Symbol("contextPlanCache"); function flag(f) { return f; } exports.NO_FLAGS = flag(0); // 0 exports.FLAG_ERROR = flag(1 << 0); // 1 exports.FLAG_NULL = flag(1 << 1); // 2 exports.FLAG_INHIBITED = flag(1 << 2); // 4 exports.FLAG_POLY_SKIPPED = flag(1 << 3); // 8 exports.FLAG_STOPPED = flag(1 << 4); // 16 exports.ALL_FLAGS = flag(exports.FLAG_ERROR | exports.FLAG_NULL | exports.FLAG_INHIBITED | exports.FLAG_POLY_SKIPPED | exports.FLAG_STOPPED); /** By default, accept null values as an input */ exports.DEFAULT_ACCEPT_FLAGS = flag(exports.FLAG_NULL); exports.TRAPPABLE_FLAGS = flag(exports.FLAG_ERROR | exports.FLAG_NULL | exports.FLAG_INHIBITED); exports.DEFAULT_FORBIDDEN_FLAGS = flag(exports.ALL_FLAGS & ~exports.DEFAULT_ACCEPT_FLAGS); exports.FORBIDDEN_BY_NULLABLE_BOUNDARY_FLAGS = flag(exports.FLAG_NULL | exports.FLAG_POLY_SKIPPED); // TODO: make `FORBIDDEN_BY_NULLABLE_BOUNDARY_FLAGS = flag(FLAG_ERROR | FLAG_NULL | FLAG_POLY_SKIPPED | FLAG_INHIBITED | FLAG_STOPPED);` // Currently this isn't enabled because the bucket has to exist for the output // plan to throw the error; really the root should be evaluated before // descending into the output plan rather than as part of descending? //# sourceMappingURL=constants.js.map