MCPcopy Create free account
hub / github.com/TanStack/router / fetchPosts

Function fetchPosts

e2e/solid-router/basic-solid-query/src/posts.ts:18–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16}
17
18const fetchPosts = async () => {
19 console.info('Fetching posts...')
20 await new Promise((r) => setTimeout(r, 500))
21 return axios
22 .get<Array<PostType>>(`${queryURL}/posts`)
23 .then((r) => r.data.slice(0, 10))
24}
25
26const fetchPost = async (postId: string) => {
27 console.info(`Fetching post with id ${postId}...`)

Callers 1

posts.tsFile · 0.70

Calls 3

infoMethod · 0.65
thenMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected