(address: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getLabels>>, TError, TData>, }
)
| 58 | |
| 59 | |
| 60 | export const getGetLabelsQueryOptions = <TData = Awaited<ReturnType<typeof getLabels>>, TError = unknown>(address: string, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getLabels>>, TError, TData>, } |
| 61 | ) => { |
| 62 | |
| 63 | const {query: queryOptions} = options ?? {}; |
| 64 | |
| 65 | const queryKey = queryOptions?.queryKey ?? getGetLabelsQueryKey(address); |
| 66 | |
| 67 | |
| 68 | |
| 69 | const queryFn: QueryFunction<Awaited<ReturnType<typeof getLabels>>> = ({ signal }) => getLabels(address, signal); |
| 70 | |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | return { queryKey, queryFn, enabled: !!(address), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getLabels>>, TError, TData> & { queryKey: QueryKey } |
| 76 | } |
| 77 | |
| 78 | export type GetLabelsQueryResult = NonNullable<Awaited<ReturnType<typeof getLabels>>> |
| 79 | export type GetLabelsQueryError = unknown |
no test coverage detected