@pothos/core
Version:
Pothos (formerly GiraphQL) is a plugin based schema builder for creating code-first GraphQL schemas in typescript
12 lines (11 loc) • 500 B
TypeScript
export declare const contextCacheSymbol: unique symbol;
export declare function initContextCache(): {
[contextCacheSymbol]: {};
};
export interface ContextCache<T, C extends object, Args extends unknown[]> {
(context: C, ...args: Args): T;
delete: (context: C) => void;
}
export declare function createContextCache<T, C extends object = object, Args extends unknown[] = [
]>(create: (context: C, ...args: Args) => T): ContextCache<T, C, Args>;
//# sourceMappingURL=context-cache.d.ts.map