apollo icon indicating copy to clipboard operation
apollo copied to clipboard

`useGlobalQueryLoading` causes maximum recursive updates error

Open Tenrys opened this issue 3 years ago • 2 comments

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:

image

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

Tenrys avatar May 24 '22 14:05 Tenrys

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.

rherych-vector avatar Oct 03 '23 12:10 rherych-vector

I have also experienced this. The aforementioned error occurs for me when I run vitest unit tests and use useGlobalQueryLoading().

mobsean avatar Mar 08 '24 07:03 mobsean