BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/Supabase Library/infinite-query-composable

Infinite Query for Vue and Supabase

supabase-library/infinite-query-composable
FreeComponent

Vue Composable for infinite lists, fetching data from Supabase.

Install it

npx shadcn@latest add https://raw.githubusercontent.com/supabase/supabase/master/apps/ui-library/public/r/infinite-query-composable.json

Source

registry/default/infinite-query/vue/composables/useInfiniteQuery.tsraw.githubusercontent.com/supabase/supabase/master/apps/ui-library/public/r/infinite-query-composable.json
1import { PostgrestQueryBuilder, type PostgrestClientOptions } from '@supabase/postgrest-js'
2import { type SupabaseClient } from '@supabase/supabase-js'
3import { computed, onMounted, reactive, toRefs, watch } from 'vue'
4
5// @ts-ignore
6import { createClient } from '@/lib/supabase/client'
7
8const supabase = createClient()
9
10type SupabaseClientType = typeof supabase
11
12type IfAny<T, Y, N> = 0 extends 1 & T ? Y : N
13
14type Database =
15 SupabaseClientType extends SupabaseClient<infer U>
16 ? IfAny<
17 U,
18 {
19 public: {
20 Tables: Record<string, any>
21 Views: Record<string, any>
22 Functions: Record<string, any>
23 }
24 },
25 U
26 >
27 : {
28 public: {
29 Tables: Record<string, any>
30 Views: Record<string, any>
31 Functions: Record<string, any>
32 }
33 }
34
35type DatabaseSchema = Database['public']
36type SupabaseTableName = keyof DatabaseSchema['Tables']
37type SupabaseTableData<T extends SupabaseTableName> = DatabaseSchema['Tables'][T]['Row']
38
39type DefaultClientOptions = PostgrestClientOptions
40
41type SupabaseSelectBuilder<T extends SupabaseTableName> = ReturnType<
42 PostgrestQueryBuilder<
43 DefaultClientOptions,
44 DatabaseSchema,
45 DatabaseSchema['Tables'][T],
46 T
47 >['select']
48>
49
50export type SupabaseQueryHandler<T extends SupabaseTableName> = (
51 query: SupabaseSelectBuilder<T>
52) => SupabaseSelectBuilder<T>
53
54export interface UseInfiniteQueryProps<T extends SupabaseTableName> {
55 tableName: T
56 columns?: string
57 pageSize?: number
58 trailingQuery?: SupabaseQueryHandler<T>
59}
60
61interface State<TData> {
62 data: TData[]
63 count: number
64 isSuccess: boolean
65 isLoading: boolean
66 isFetching: boolean
67 error: Error | null
68 hasInitialFetch: boolean
69 requestCounter: number
70}
71
72// --------------------
73// Composable
74// --------------------
75
76export function useInfiniteQuery<
77 TData extends SupabaseTableData<T>,
78 T extends SupabaseTableName = SupabaseTableName,
79>(props: UseInfiniteQueryProps<T>) {
80 const state = reactive<State<TData>>({
81 data: [],
82 count: 0,
83 isSuccess: false,
84 isLoading: false,
85 isFetching: false,
86 error: null,
87 hasInitialFetch: false,
88 requestCounter: 0,
89 })
90
91 const pageSize = computed(() => props.pageSize ?? 20)
92 const columns = computed(() => props.columns ?? '*')
93
94 const fetchPage = async (skip: number) => {
95 // Capture the current request token to validate this request later
96// … truncated

What it pulls in

npm packages

  • @supabase/supabase-js@latest
  • @supabase/postgrest-js@*

Files it writes

  • registry/default/infinite-query/vue/composables/useInfiniteQuery.ts

Facts

Registry
Supabase Library
Type
registry:component
Access
Free
Files written
1
Licence
Apache-2.0
In the index
at or before 2026-08-13
Last confirmed
today

Go to the source

supabase.com supabase/supabase on GitHub Raw registry item This item as JSON

More from Supabase Library

All 60 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Current User Avatarcurrent-user-avatar-nextjsSupabase LibraryComponentsFree2 deps · 6 files
Current User Avatarcurrent-user-avatar-reactSupabase LibraryComponentsFree1 dep · 4 files
Current User Avatarcurrent-user-avatar-react-routerSupabase LibraryComponentsFree2 deps · 5 files
Current User Avatarcurrent-user-avatar-tanstackSupabase LibraryComponentsFree2 deps · 5 files
Dropzone (File Upload)dropzone-nextjsSupabase LibraryComponentsFree4 deps · 5 files
Dropzone (File Upload)dropzone-reactSupabase LibraryComponentsFree3 deps · 3 files
Dropzone (File Upload)dropzone-react-routerSupabase LibraryComponentsFree4 deps · 4 files
Dropzone (File Upload)dropzone-tanstackSupabase LibraryComponentsFree4 deps · 4 files

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

KitGrade

SaaS starter kits, scored from measured facts

kitgrade.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex