Interface IWithQuery<TRequestSchema, TResponseSchema>

This is a base object containing everything you need to use a query.

interface IWithQuery<TRequestSchema, TResponseSchema> {
    key: QueryKey;
    schema: {
        request: TRequestSchema;
        response: TResponseSchema;
    };
    useCallback(): ((request) => Promise<TypeOf<TResponseSchema>>);
}

Type Parameters

  • TRequestSchema extends RequestSchema

    Shape of the request schema.

  • TResponseSchema extends ResponseSchema

    Shape of the response schema.

Hierarchy

  • IInvalidator
    • IWithQuery

Methods

Properties

Methods

Properties

key: QueryKey

Query key used in React Query

schema: {
    request: TRequestSchema;
    response: TResponseSchema;
}

This is obvious, isn't it?

Type declaration