API Reference

ConvexQuery

Reference for the Nuxt renderless component that wraps useConvexQuery.

ConvexQuery is a Nuxt-only global component that renders query states through slots.

Example

app/pages/tasks.vue
<script setup lang="ts">
import { api } from '#convex/api'
</script>

<template>
  <ConvexQuery :query="api.tasks.list" :args="{ userId: 'user_123' }">
    <template #loading>
      Loading tasks...
    </template>

    <template #error="{ error }">
      {{ error.message }}
    </template>

    <template #empty>
      No tasks yet.
    </template>

    <template #default="{ data }">
      <ul>
        <li v-for="task in data" :key="task._id">
          {{ task.title }}
        </li>
      </ul>
    </template>
  </ConvexQuery>
</template>

Props

PropTypeMeaning
queryFunctionReference<'query'>Query reference
argsFunctionArgs<Query>Query arguments
optionsUseConvexQueryOptionsSame options accepted by useConvexQuery
suspensebooleanForces an explicit await before render

Slots

  • loading
  • error
  • empty
  • default

Behavior

  • Uses useConvexQuery internally
  • On the server, waits for the first result when SSR is enabled
  • Treats undefined and an empty array as empty states
Copyright © 2026