Nuxt · NUXT0005
Use queryCollection instead of queryContent
Flags querycontent legacy API in Nuxt project code before it leaks into runtime behavior.
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.
Recommended fix
Remove querycontent legacy API, or move it to the Nuxt runtime/API that owns that behavior.
Useful links
Example
Use queryCollection
Before
const posts = await queryContent('/blog').find()
After
const posts = await queryCollection('blog').all()