useGlobalQueryLoading() do not work, when wrapping useQuery in a an promise resolving in onResult() callback. #1206
Unanswered
joelmandell
asked this question in
Q&A
Replies: 2 comments 3 replies
-
Move |
Beta Was this translation helpful? Give feedback.
3 replies
-
I have the same problem. To better organize my codebase, I have moved Are there any solutions for this? Here is my settingsApi.js
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have written an helper function that uses useQuery. It is in use in an Vuex-module. I have promisified it.
In my App.vue I'm using "const loading = useGlobalQueryLoading()".
If I use useQuery or useLazyQuery on its own, the loading works.
Here is my useQuery transformed into an useQueryAsync:
And here is the code that uses it, that does not trigger loading indicator:
But here is the same query that is above, but using useLazyQuery. But it does not behave the way I want it to, there fore my try to implement it as an promise.
What am I doing wrong, can somebody point me in the right direction?
Beta Was this translation helpful? Give feedback.
All reactions