import * as Knex from "knex"; import { OperationResolver } from "./OperationResolver"; import { ResolverContext } from "./ResolverContext"; import { MappedOperation } from "."; export interface BaseStoreParams { queryBuilder: Knex.QueryBuilder; } /** * Base class for operation resolvers that need to interact with one or more mapped data sources * * @api-category CRUDResolvers */ export declare class BaseResolver, TArgs>, TArgs extends {}, TResolved> implements OperationResolver { resolverContext: TCtx; /** * If false, then the operation was triggered directly from the GraphQL * API. * * If false, then another operation delegated to this operation. */ isDelegated: boolean | undefined; constructor(resolverContext: TCtx); /** * Parsed arguments received from the API client */ get args(): TArgs; /** * Should be overriden in sub-class with the logic of resolution */ resolve(): Promise; /** * The operation being resolved * * @type MappedOperation */ get operation(): TCtx["MappedOperationType"]; /** * Can be overriden to return a collection of resolver instances that we are delegating to. * * This is required for sharing the same transactions across the root resolver and all the * delegated resolvers */ get delegatedResolvers(): OperationResolver[]; /** * Get name of current operation */ get name(): string; }