API Reference

useConvexPaginatedQuery

Reference for the client-only paginated query composable.

useConvexPaginatedQuery subscribes to paginated Convex query results and manages page accumulation on the client.

Import

Nuxt
const { data, loadMore } = useConvexPaginatedQuery(api.tasks.paginated, {}, { numItems: 20 })
Vue
import { useConvexPaginatedQuery } from 'vue-convex'

Signature

function useConvexPaginatedQuery<Query extends FunctionReference<'query'>>(
  query: Query,
  args: MaybeRefOrGetter<Omit<FunctionArgs<Query>, 'paginationOpts'> | 'skip'>,
  options: {
    numItems: number
  },
): {
  suspense: () => Promise<unknown[][]>
  pages: ComputedRef<unknown[][]>
  data: ComputedRef<unknown[]>
  lastPage: ComputedRef<PaginationResult<unknown> | undefined>
  error: Readonly<Ref<Error | null>>
  isDone: Readonly<Ref<boolean>>
  isPending: ComputedRef<boolean>
  isSkipped: ComputedRef<boolean>
  isLoadingMore: Readonly<Ref<boolean>>
  loadMore: () => void
  reset: () => void
}

Parameters

ParameterTypeMeaning
queryFunctionReference<'query'>Generated paginated query reference
argsOmit<FunctionArgs<Query>, 'paginationOpts'> | 'skip'Query args without paginationOpts, or "skip"
options.numItemsnumberPage size for each request

Return value

FieldMeaning
pagesLoaded results grouped by page
dataFlattened items from all loaded pages
lastPageRaw most recent pagination result
isDonetrue when there are no more pages
isLoadingMoretrue while a later page is loading
loadMoreRequests the next page
resetClears the current pages and restarts from page one

Behavior

  • Client-only; no SSR prefetch path
  • Re-subscribes and resets automatically when reactive args change
  • Clears all pages when args becomes "skip"
Copyright © 2026