Description
Describe the bug
I'm working on a web app. I need to mock graphql requests in those tests. I use mock-apollo-client with @vue/apollo-composables. It only breaks in tests, not dev/production builds, and only when clientId is set manually (including literal "default" value) in the useQuery call.
Expected behavior
It just works?
Versions
vue: ^3.3.13
vue-apollo: ^4.0.1
@apollo/client: ^3.9.4
@vue/apollo-composable: ^4.0.1
Additional context
After hours of searching for information and debuggin the code, I think I found the source of the issue:
Proposed solution
Don't throw in resolveClientWithId and use a similar hack like in resolveDefaultClient, or throw the error after both resolvers fail, not after the first one.
EDIT: pretty sure it's the same issue as here, although I might be wrong