@quell/server
Version:
Quell is an open-source NPM package providing a light-weight caching layer implementation and cache invalidation for GraphQL responses on both the client- and server-side. Use Quell to prevent redundant client-side API requests and to minimize costly serv
22 lines • 998 B
TypeScript
import type { ProtoObjType, QueryMapType, ResponseDataType } from "../types/types";
import type { WriteToCacheFunction, UpdateIdCacheFunction } from "../types/writeCacheTypes";
/**
* Configuration interface for normalize cache operations
*/
export interface NormalizeCacheConfig {
writeToCache: WriteToCacheFunction;
updateIdCache: UpdateIdCacheFunction;
}
/**
* Function type for normalizing data for cache
*/
export type NormalizeForCacheFunction = (responseData: ResponseDataType, map: QueryMapType, protoField: ProtoObjType, currName: string) => Promise<void>;
/**
* Creates a normalizeForCache function with the provided configuration
* This is the main normalization logic that processes GraphQL responses
* and prepares them for caching
* @param config - Configuration object
* @returns Bound normalizeForCache function
*/
export declare function createNormalizeForCache(config: NormalizeCacheConfig): NormalizeForCacheFunction;
//# sourceMappingURL=normalizeCache.d.ts.map