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