import type { FetchResult, WatchQueryFetchPolicy } from '@apollo/client'; import type { TypedDocumentNode } from '@graphql-typed-document-node/core'; import type { Handler, SpreadAsyncHandler, VoidHandler } from '../../utils/types'; export interface CarbonQueryOptions { skip?: boolean; variables?: TVariables; pollInterval?: number; fetchPolicy?: WatchQueryFetchPolicy; } export interface CarbonResult { data?: TResult; error?: Error; loading: boolean; refetch: SpreadAsyncHandler<[variables?: TVariables], FetchResult>; startPolling: Handler; stopPolling: VoidHandler; } /** * Executes a Carbon GraphQL query against the Source Experience API * * Internally, this method invokes Apollo's useQuery() hook, passing in the custom client * created for use by Carbon. * * @param document the document that should be generated * @param options the options for the document to generate * @returns results of executing the query */ export declare function useCarbonQuery(document: TypedDocumentNode, options?: CarbonQueryOptions): CarbonResult;