/**
 * Per-API feature flag overrides; NULL columns inherit from database_settings, explicit true/false overrides the database default
 * @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 { apiSettingKeys } from '../query-keys';
/** Query key factory - re-exported from query-keys.ts */
export const apiSettingsQueryKey = apiSettingKeys.list;
export function useApiSettingsQuery(params) {
    const args = buildListSelectionArgs(params.selection);
    const { selection: _selection, ...queryOptions } = params ?? {};
    void _selection;
    return useQuery({
        queryKey: apiSettingKeys.list(args),
        queryFn: () => getClient().apiSetting.findMany(args).unwrap(),
        ...queryOptions,
    });
}
export async function fetchApiSettingsQuery(params) {
    const args = buildListSelectionArgs(params.selection);
    return getClient().apiSetting.findMany(args).unwrap();
}
export async function prefetchApiSettingsQuery(queryClient, params) {
    const args = buildListSelectionArgs(params.selection);
    await queryClient.prefetchQuery({
        queryKey: apiSettingKeys.list(args),
        queryFn: () => getClient().apiSetting.findMany(args).unwrap(),
    });
}
