Vue OpenAPI Query Documentation
    Preparing search index...

    Type Alias LazyQueryReturn<TResponse, TPathParams, TQueryParams>

    LazyQueryReturn: Pick<
        QueryReturn<TResponse, TPathParams>,

            | "data"
            | "isPending"
            | "isSuccess"
            | "isError"
            | "error"
            | "isEnabled"
            | "pathParams"
            | "queryKey"
            | "responseHeaders",
    > & {
        fetch: (
            options?: LazyQueryFetchOptions<TQueryParams>,
        ) => Promise<TResponse>;
    }

    Return type of useLazyQuery.

    Shares the reactive state fields of QueryReturn (data, isPending, isSuccess, isError, error, isEnabled, pathParams, queryKey) and adds a fetch() method for imperative, on-demand query execution.

    Type Parameters

    • TResponse

      Response data type

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

      Path parameters type

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

      Query parameters type

    Type Declaration

    • fetch: (options?: LazyQueryFetchOptions<TQueryParams>) => Promise<TResponse>

      Execute a query imperatively.

      Uses queryClient.fetchQuery() — result is written to the TanStack cache under the same key as useQuery for this operation+queryParams, so both composables share data automatically.

      If path parameters are not yet resolved