Skip to main content

Interface: QueryListResponse<DataType, ItemType, ErrorType>

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>>;

Results from individual clusters. Keyed by cluster name.

Defined in

src/lib/k8s/api/v2/hooks.ts:80


data

data: null | DataType;

The last successfully resolved data for the query.

Inherited from

QueryResponse.data

Defined in

src/lib/k8s/api/v2/hooks.ts:37


error

error: null | ErrorType;

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

  • Defaults to null.

Inherited from

QueryResponse.error

Defined in

src/lib/k8s/api/v2/hooks.ts:42


errors

errors: null | ApiError[];

Defined in

src/lib/k8s/api/v2/hooks.ts:81


isError

isError: boolean;

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

  • true if the query attempt resulted in an error.

Inherited from

QueryResponse.isError

Defined in

src/lib/k8s/api/v2/hooks.ts:47


isFetching

isFetching: boolean;

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

Inherited from

QueryResponse.isFetching

Defined in

src/lib/k8s/api/v2/hooks.ts:55


isLoading

isLoading: boolean;

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

Inherited from

QueryResponse.isLoading

Defined in

src/lib/k8s/api/v2/hooks.ts:51


isSuccess

isSuccess: boolean;

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

Defined in

src/lib/k8s/api/v2/hooks.ts:60


items

items: null | ItemType[];

Defined in

src/lib/k8s/api/v2/hooks.ts:76


status

status: QueryStatus;

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

Defined in

src/lib/k8s/api/v2/hooks.ts:68