'How to use mock service worker to test vue apollo?
I have set up mock service worker to test my composition functions but get the error: Apollo client with id default not found. Use provideApolloClient() if you are outside of a component setup..
Guess I should use provideApolloClient but pasting that in search gives me nothing.
The docs show to inject data in component and mock schema (not getting that part). But I am not testing a component, I am trying to test a custom composition function (hook) and make sure it interfaces with useQuery correctly.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
