Nuxt · NUXT0005

Use queryCollection instead of queryContent

Flags querycontent legacy API in Nuxt project code before it leaks into runtime behavior.
NUXT0005vite-doctor/nuxt-contentcontentwarnSuggestion
nuxt-content/no-querycontent-legacy-apisrc/rule-packs/nuxt/rules/nuxt-content.ts Upstream docs

Run this rule

pnpm nuxt doctor --rules nuxt-content/no-querycontent-legacy-api

Why it matters

Nuxt gives this pattern a specific contract. Staying inside that contract makes the code easier to test, refactor, and run across server and client runtimes.

Remove querycontent legacy API, or move it to the Nuxt runtime/API that owns that behavior.

Example

Use queryCollection

Before

const posts = await queryContent('/blog').find()

After

const posts = await queryCollection('blog').all()
Copyright © 2026