MCPcopy Create free account
hub / github.com/HuolalaTech/react-query-kit / fetcher

Function fetcher

tests/createInfiniteQuery.test.tsx:14–16  ·  view source on GitHub ↗
(_variables: Variables)

Source from the content-addressed store, hash-verified

12 const key = uniqueKey()
13 const variables = { id: 1 }
14 const fetcher = (_variables: Variables): Promise<Response> => {
15 return fetch(`/test`).then(res => res.json())
16 }
17 const initialPageParam = 1
18 const getNextPageParam = (lastPage: Response) => lastPage.nextCursor
19 const useGeneratedQuery = createInfiniteQuery<Response, Variables, Error>({

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected