/**
 * List query hook for ComputeLogModule
 * @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 { computeLogModuleKeys } from '../query-keys';
/** Query key factory - re-exported from query-keys.ts */
export const computeLogModulesQueryKey = computeLogModuleKeys.list;
export function useComputeLogModulesQuery(params) {
    const args = buildListSelectionArgs(params.selection);
    const { selection: _selection, ...queryOptions } = params ?? {};
    void _selection;
    return useQuery({
        queryKey: computeLogModuleKeys.list(args),
        queryFn: () => getClient().computeLogModule.findMany(args).unwrap(),
        ...queryOptions,
    });
}
export async function fetchComputeLogModulesQuery(params) {
    const args = buildListSelectionArgs(params.selection);
    return getClient().computeLogModule.findMany(args).unwrap();
}
export async function prefetchComputeLogModulesQuery(queryClient, params) {
    const args = buildListSelectionArgs(params.selection);
    await queryClient.prefetchQuery({
        queryKey: computeLogModuleKeys.list(args),
        queryFn: () => getClient().computeLogModule.findMany(args).unwrap(),
    });
}
