Skip to main content

Interface: QueryListResponse<DataType, ItemType, ErrorType>

Defined in: lib/k8s/api/v2/hooks.ts:75

Query response containing KubeList with added items field for convenience

Extends​

Type Parameters​

Type Parameter
DataType
ItemType
ErrorType

Properties​

clusterResults?​

optional clusterResults?: Record<string, QueryListResponse<DataType, ItemType, ErrorType>>;

Defined in: lib/k8s/api/v2/hooks.ts:81

Results from individual clusters. Keyed by cluster name.


data​

data: DataType | null;

Defined in: lib/k8s/api/v2/hooks.ts:38

The last successfully resolved data for the query.

Inherited from​

QueryResponse.data


error​

error: ErrorType | null;

Defined in: lib/k8s/api/v2/hooks.ts:43

The error object for the query, if an error was thrown.

  • Defaults to null.

Inherited from​

QueryResponse.error


errors​

errors: ApiError[] | null;

Defined in: lib/k8s/api/v2/hooks.ts:82


hasMore?​

optional hasMore?: boolean;

Defined in: lib/k8s/api/v2/hooks.ts:84

True when at least one cluster/namespace has more items available via pagination.


isError​

isError: boolean;

Defined in: lib/k8s/api/v2/hooks.ts:48

A derived boolean from the status variable, provided for convenience.

  • true if the query attempt resulted in an error.

Inherited from​

QueryResponse.isError


isFetching​

isFetching: boolean;

Defined in: lib/k8s/api/v2/hooks.ts:56

Is true whenever the query is executing, which includes initial fetch as well as background refetch.

Inherited from​

QueryResponse.isFetching


isLoading​

isLoading: boolean;

Defined in: lib/k8s/api/v2/hooks.ts:52

Is true whenever the first fetch for a query is in-flight.

Inherited from​

QueryResponse.isLoading


isSuccess​

isSuccess: boolean;

Defined in: lib/k8s/api/v2/hooks.ts:61

A derived boolean from the status variable, provided for convenience.

  • true if the query has received a response with no errors and is ready to display its data.

Inherited from​

QueryResponse.isSuccess


items​

items: ItemType[] | null;

Defined in: lib/k8s/api/v2/hooks.ts:77


loadMore?​

optional loadMore?: () => Promise<void>;

Defined in: lib/k8s/api/v2/hooks.ts:88

Fetch and append the next page of results. Only present when hasMore is true.

Returns​

Promise<void>


remainingItemCount?​

optional remainingItemCount?: number;

Defined in: lib/k8s/api/v2/hooks.ts:86

Approximate total count of items not yet fetched across all results.


status​

status: QueryStatus;

Defined in: lib/k8s/api/v2/hooks.ts:69

The status of the query.

  • Will be:
    • pending if there's no cached data and no query attempt was finished yet.
    • error if the query attempt resulted in an error.
    • success if the query has received a response with no errors and is ready to display its data.

Inherited from​

QueryResponse.status