
Research
/Security News
Miasma Mini Shai-Hulud Hits ImmobiliareLabs npm Packages
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.
nuxt-supabase-query-as-async-data
Advanced tools
A Nuxt module that enhances developer experience when using Supabase by enabling fluent queries (e.g., supabase.from(...).select(...)) to integrate directly with useAsyncData() via a convenient .asAsyncData() method—no manual wrapping required.
nuxt-supabase-query-as-async-data lets you fluently convert Supabase query chains into Nuxt's useAsyncData() calls by appending .asAsyncData(key). This simplifies server-side rendering and data fetching with minimal boilerplate.
.asAsyncData() to Supabase query buildersuseAsyncData()# Using npm
npm install nuxt-supabase-query-as-async-data
# Using yarn
yarn add nuxt-supabase-query-as-async-data
# Using pnpm
pnpm add nuxt-supabase-query-as-async-data
This module depends on @supabase/postgrest-js. If you're already using:
@supabase/supabase-js, or@nuxtjs/supabase module,...you’re good to go. Otherwise, install it manually:
npm install @supabase/postgrest-js
Register the module in your nuxt.config.ts:
export default defineNuxtConfig({
modules: [
'nuxt-supabase-query-as-async-data'
]
})
Once installed, Supabase queries gain the .asAsyncData() method automatically:
const { data, pending, error } = await supabase
.from('users')
.select('*')
.eq('id', 1)
.asAsyncData('user-query');
Equivalent to:
const { data, pending, error } = await useAsyncData(
'user-query',
() => supabase.from('users').select('*').eq('id', 1)
);
This module uses declaration merging to provide type safety and auto-completion for .asAsyncData() on all compatible Supabase query builders.
@supabase/postgrest-jsContributions are welcome! Feel free to open an issue or submit a pull request.
git checkout -b feature/my-featuregit commit -am 'Add my feature'git push origin feature/my-featureThis project is licensed under the MIT License.
Made with ❤️ by Leynier Gutiérrez González
FAQs
Nuxt module for using Supabase queries as asyncData
We found that nuxt-supabase-query-as-async-data demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.

Security News
Rolldown paused Rust React Compiler integration after a 5MB binary size increase raised concerns about shipping React-specific code to all Vite users.

Security News
/Research
Mini Shai-Hulud expands into the Go ecosystem after hitting LeoPlatform npm packages and targeting GitHub Actions workflows.