MCPcopy Create free account
hub / github.com/TanStack/db / getAll

Function getAll

examples/electron/offline-first/src/utils/api.ts:12–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10
11export const todoApi = {
12 async getAll(): Promise<Array<Todo>> {
13 const response = await fetch(`${BASE_URL}/api/todos`)
14 if (!response.ok) {
15 throw new Error(`Failed to fetch todos: ${response.status}`)
16 }
17 return response.json()
18 },
19
20 async create(data: {
21 id: string

Callers

nothing calls this directly

Calls 1

fetchFunction · 0.50

Tested by

no test coverage detected