import { DocumentNode } from '@apollo/client'; import type { FaustQueries } from './FaustContext.js'; type Variables = { [key: string]: any; }; /** * Get the key a query's result is stored under. With variables, the key also * covers them, in any key order, so the same query can be stored once per set * of variables. Variables go through JSON first, as they do when Apollo sends * them, so values like dates keep what makes them different. */ export declare function getFaustQueryKey(query: DocumentNode, variables?: Variables): string; /** * Store the results of a template's `queries`. * * Each result is stored once. The query-only key holds the last result for * each query, as it always has, so `useFaustQuery(query)` keeps working. * Results with variables that aren't under the query-only key are stored * under a key for the query and its variables. */ export declare function storeFaustQueries(results: { query: DocumentNode; variables?: Variables; data: any; }[]): FaustQueries; /** * Read a stored query result, optionally the one for specific variables. */ export declare function readFaustQuery(queries: FaustQueries | null | undefined, query: DocumentNode, variables?: Variables): any; export {};