Vue OpenAPI Query Documentation
    Preparing search index...

    Type Alias QueryReturn<TResponse, TPathParams>

    QueryReturn: Omit<UseQueryReturnType<TResponse, Error>, "data" | "isEnabled"> & {
        data: ComputedRef<TResponse | undefined>;
        isEnabled: ComputedRef<boolean>;
        queryKey: ComputedRef<string[] | (string | unknown)[]>;
        pathParams: ComputedRef<TPathParams>;
        onLoad: (callback: (data: TResponse) => void) => void;
        responseHeaders: ShallowRef<Record<string, string>>;
    }

    Return type of useEndpointQuery (the useQuery composable on a generated namespace).

    Extends TanStack's UseQueryReturnType<TResponse, Error> so all fields — including refetch, isPending, isLoading, isSuccess, isError, error, etc. — carry their real TanStack types. data is overridden with a ComputedRef typed to TResponse | undefined, and three extra fields are added for our own abstractions.

    Type Parameters

    • TResponse

      Response data type

    • TPathParams extends Record<string, unknown> = Record<string, never>

      Path parameters type (concrete, no undefined)

    Type Declaration

    • data: ComputedRef<TResponse | undefined>

      The response data (undefined until loaded).

    • isEnabled: ComputedRef<boolean>

      Whether the query is currently enabled.

    • queryKey: ComputedRef<string[] | (string | unknown)[]>

      The resolved query key.

    • pathParams: ComputedRef<TPathParams>

      The resolved path parameters.

    • onLoad: (callback: (data: TResponse) => void) => void

      Register a callback for when data loads successfully for the first time.

    • responseHeaders: ShallowRef<Record<string, string>>

      Response headers from the last successful query.