UNPKG

@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

24 lines 1.2 kB
import type { ExecutionResult } from "graphql"; import type { QueryMapType, DatabaseResponseDataRaw } from "../types/types"; import type { UpdateCacheConfig, UpdateCacheByMutationFunction, ExtractedResponseData } from "../types/updateCacheTypes"; /** * Creates an updateCacheByMutation function with the provided configuration * MIGRATED FROM: QuellCache.updateCacheByMutation * @param config - Configuration object * @returns Bound updateCacheByMutation function */ export declare function createUpdateCacheByMutation(config: UpdateCacheConfig): UpdateCacheByMutationFunction; /** * Helper function to determine if a mutation is a delete mutation * based on the mutation name prefix */ export declare function isDeleteMutation(mutationName: string): boolean; /** * Helper function to extract data from database response */ export declare function extractDataFromResponse(dbRespDataRaw: DatabaseResponseDataRaw | ExecutionResult, mutationName: string): ExtractedResponseData; /** * Helper function to find the fields list key for a mutation type */ export declare function findFieldsListKey(queryMap: QueryMapType, mutationType: string): string; //# sourceMappingURL=updateCache.d.ts.map