({ queryKey }: { queryKey: QueryKey })
| 17 | |
| 18 | // Define a default query function that will receive the query key |
| 19 | const defaultQueryFn = async ({ queryKey }: { queryKey: QueryKey }) => { |
| 20 | const response = await fetch( |
| 21 | `https://jsonplaceholder.typicode.com${queryKey[0]}`, |
| 22 | ) |
| 23 | return await response.json() |
| 24 | } |
| 25 | |
| 26 | // provide the default query function to your app via the query client |
| 27 | const queryClient = new QueryClient({ |
nothing calls this directly
no outgoing calls
no test coverage detected