import { type CacheStore, type CacheSetOptions } from '@nl-framework/core'; import type { GraphqlExecutionContext } from '../guards/types'; import type { GraphqlCallHandler, GraphqlInterceptor } from './types'; export interface GraphqlCacheInterceptorOptions extends CacheSetOptions { store: CacheStore; /** * Build a cache key from the execution context. Defaults to resolver + field + args. */ key?: (context: GraphqlExecutionContext) => string | undefined | Promise; /** * Should this resolver result be cached? */ shouldCacheResult?: (context: GraphqlExecutionContext, result: unknown) => boolean | Promise; /** * Operations to cache. Defaults to queries only. */ operations?: Array<'query' | 'mutation' | 'subscription'>; } export declare class GraphqlCacheInterceptor implements GraphqlInterceptor { private readonly options; private readonly cacheableOperations; constructor(options: GraphqlCacheInterceptorOptions); intercept(context: GraphqlExecutionContext, next: GraphqlCallHandler): Promise; private resolveKey; private shouldCache; } //# sourceMappingURL=cache.interceptor.d.ts.map