import { type Store } from "effector"; import { type ApolloClient, type OperationVariables } from "@apollo/client"; import type { Query } from "./query.js"; interface WatchQueryOptions { /** * Your Apollo Client instance that'll be used for watching the cache. * By default, the same client you use to make requests will be used * to watch the cache. */ client?: ApolloClient | Store>; /** * Controls when `watchQuery` will listen to updates in cache. * * By default, this is when the {@link Query} has succeeded. * (i.e. run successfully at least once and not reset). * * --- * * Note: `enabled` being `true` is required but not sufficient for `Query` * to subscribe to cache. The query needs to aquire variables */ enabled?: Store; /** Watch for optimistic updates? */ optimistic?: boolean; } /** * Watch for Apollo Cache changes and update your `Query` to match. * * Subscribes your query to Apollo Cache to always keep `$data` * in sync with Apollo Cache. Usually, `Query` only updates its * `$data` upon request. `watchQuery` changes that so your `Query` * behaves more like Apollo Client's React hooks. */ export declare function watchQuery(query: Query, { client, enabled: $enabled, optimistic, }?: WatchQueryOptions): void; export {};