apollo
apollo copied to clipboard
`useGlobalQueryLoading` causes maximum recursive updates error
Describe the bug
Trying to use useGlobalQueryLoading and pass it to a component as a prop.
Causes this message to appear.
Maximum recursive updates exceeded in component <MyComponent>. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.
I tried not passing it as a prop and using it in the target component, but the result was the same. If this helps in any way:

To Reproduce
Import useGlobalQueryLoading, run it and try to use the returned computed for rendering. The above warning will be displayed
Versions vue: 3.2.36 @vue/apollo-composable: 4.0.0-alpha.17 @apollo/client: 3.6.4
I have the same situation. (4.0.0-beta.1). This happens when I change the code in my app and the app is still reloading, then after loading, I get a page that freezes with the same message: Unhandled error during execution of scheduler flush.
I have also experienced this. The aforementioned error occurs for me when I run vitest unit tests and use useGlobalQueryLoading().