MCPcopy
hub / github.com/TanStack/query / getContact

Function getContact

examples/react/react-router/src/contacts.ts:61–67  ·  view source on GitHub ↗
(id: string)

Source from the content-addressed store, hash-verified

59}
60
61export async function getContact(id: string) {
62 await fakeNetwork()
63 let contacts = await localforage.getItem<Contact[]>('contacts')
64 if (!contacts) return null
65 let contact = contacts.find((contact) => contact.id === id)
66 return contact ?? null
67}
68
69export async function updateContact(id: string, updates: Partial<Contact>) {
70 await fakeNetwork()

Callers 1

contactDetailQueryFunction · 0.90

Calls 2

fakeNetworkFunction · 0.85
findMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…