Skip to content

API reference > @kontsedal/olas-vue > UseQueryReturn

UseQueryReturn type ​

What useQuery returns: each AsyncState signal as a ref, plus the actions.

Signature:

typescript
export type UseQueryReturn<T> = Refs<{
  data: T | undefined;
  error: unknown;
  status: AsyncStatus;
  isLoading: boolean;
  isFetching: boolean;
  isStale: boolean;
  isPaused: boolean;
  isEnabled: boolean;
  lastUpdatedAt: number | undefined;
  hasPendingMutations: boolean;
}> & {
  refetch: () => Promise<T>;
  reset: () => void;
  cancel: () => void;
};

References: Refs, AsyncStatus

Released under the MIT License.