Skip to content

Commit 06fad91

Browse files
committed
docs(default-query-function): fix the default query function params
1 parent b8a97fb commit 06fad91

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/default-query-function/src/App.svelte

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
55
import BasicQuery from './BasicQuery.svelte'
66
7-
const defaultQueryFn = async key => {
7+
const defaultQueryFn = async ({ queryKey }) => {
88
const { data } = await axios.get(
9-
`https://jsonplaceholder.typicode.com${key}`
9+
`https://jsonplaceholder.typicode.com${queryKey[0]}`
1010
)
11+
1112
return data
1213
}
1314

0 commit comments

Comments
 (0)