()
| 7 | |
| 8 | /** Retrieves a Client from Svelte's context */ |
| 9 | export const getQueryClientContext = (): QueryClient => { |
| 10 | const client = getContext(_contextKey) |
| 11 | if (!client) { |
| 12 | throw new Error( |
| 13 | 'No QueryClient was found in Svelte context. Did you forget to wrap your component with QueryClientProvider?', |
| 14 | ) |
| 15 | } |
| 16 | |
| 17 | return client as QueryClient |
| 18 | } |
| 19 | |
| 20 | /** Sets a QueryClient on Svelte's context */ |
| 21 | export const setQueryClientContext = (client: QueryClient): void => { |
no outgoing calls
no test coverage detected
searching dependent graphs…