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