/**
 * Custom query hook for currentUserId
 * @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 currentUserIdQueryKey = customQueryKeys.currentUserId;
export function useCurrentUserIdQuery(params) {
    const queryOptions = params ?? {};
    return useQuery({
        queryKey: currentUserIdQueryKey(),
        queryFn: () => getClient().query.currentUserId().unwrap(),
        ...queryOptions,
    });
}
/**
 * Fetch currentUserId without React hooks
 *
 * @example
 * ```ts
 * const data = await fetchCurrentUserIdQuery();
 * ```
 */
export async function fetchCurrentUserIdQuery() {
    return getClient().query.currentUserId().unwrap();
}
/**
 * Prefetch currentUserId for SSR or cache warming
 *
 * @example
 * ```ts
 * await prefetchCurrentUserIdQuery(queryClient);
 * ```
 */
export async function prefetchCurrentUserIdQuery(queryClient) {
    await queryClient.prefetchQuery({
        queryKey: currentUserIdQueryKey(),
        queryFn: () => getClient().query.currentUserId().unwrap(),
    });
}
