/**
 * Custom query hook for revParse
 * @generated by @constructive-io/graphql-codegen
 * DO NOT EDIT - changes will be overwritten
 */
import { useQuery } from '@tanstack/react-query';
import { getClient } from '../client';
import { customQueryKeys } from '../query-keys';
/** Query key factory - re-exported from query-keys.ts */
export const revParseQueryKey = customQueryKeys.revParse;
export function useRevParseQuery(params) {
    const variables = params?.variables ?? {};
    const { variables: _variables, ...queryOptions } = params ?? {};
    void _variables;
    return useQuery({
        queryKey: revParseQueryKey(variables),
        queryFn: () => getClient().query.revParse(variables).unwrap(),
        ...queryOptions,
    });
}
/**
 * Fetch revParse without React hooks
 *
 * @example
 * ```ts
 * const data = await fetchRevParseQuery({ variables: { dbId, storeId, refname } });
 * ```
 */
export async function fetchRevParseQuery(params) {
    const variables = params?.variables ?? {};
    return getClient().query.revParse(variables).unwrap();
}
/**
 * Prefetch revParse for SSR or cache warming
 *
 * @example
 * ```ts
 * await prefetchRevParseQuery(queryClient, { variables: { dbId, storeId, refname } });
 * ```
 */
export async function prefetchRevParseQuery(queryClient, params) {
    const variables = params?.variables ?? {};
    await queryClient.prefetchQuery({
        queryKey: revParseQueryKey(variables),
        queryFn: () => getClient().query.revParse(variables).unwrap(),
    });
}
