/**
 * List query hook for RateLimitsModule
 * @generated by @constructive-io/graphql-codegen
 * DO NOT EDIT - changes will be overwritten
 */
import { useQuery } from '@tanstack/react-query';
import { getClient } from '../client';
import { buildListSelectionArgs } from '../selection';
import { rateLimitsModuleKeys } from '../query-keys';
/** Query key factory - re-exported from query-keys.ts */
export const rateLimitsModulesQueryKey = rateLimitsModuleKeys.list;
export function useRateLimitsModulesQuery(params) {
    const args = buildListSelectionArgs(params.selection);
    const { selection: _selection, ...queryOptions } = params ?? {};
    void _selection;
    return useQuery({
        queryKey: rateLimitsModuleKeys.list(args),
        queryFn: () => getClient().rateLimitsModule.findMany(args).unwrap(),
        ...queryOptions,
    });
}
export async function fetchRateLimitsModulesQuery(params) {
    const args = buildListSelectionArgs(params.selection);
    return getClient().rateLimitsModule.findMany(args).unwrap();
}
export async function prefetchRateLimitsModulesQuery(queryClient, params) {
    const args = buildListSelectionArgs(params.selection);
    await queryClient.prefetchQuery({
        queryKey: rateLimitsModuleKeys.list(args),
        queryFn: () => getClient().rateLimitsModule.findMany(args).unwrap(),
    });
}
