increased number of calls 'onResult' for 'useQuery' #1473
-
Hello team, I've implemented server-side pagination for QTable component as per Quasar guide: in onResult returned by useQuery I've put console.log():
My observation: However there is a single HTTP request over network I would expect 2 calls of onResult per single onRequest: the first call is for data from cache, the second is for data received in HTTP response onRequest is an event handler defined in template for q-table @request My question Is this a bug or I misuse useQuery() / onResult()? Sample output to console while just changing table sort order (desc, asc, no sorting):
the version: |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
I used the same but with vuetify v3. Everything works as expected. If you could create bliz repo to show it. I could help you |
Beta Was this translation helpful? Give feedback.
-
Here link how I did everything |
Beta Was this translation helpful? Give feedback.
-
Thanks for your input. So, I'd like to clarify if that was my fault by mis-implementing useQuery() or that is a bug |
Beta Was this translation helpful? Give feedback.
-
Yes everything works as expected. From your code I can see
Rewrite to
Mutation and query must be defined at top level not inside the function. Check documantation for more information or provide example I will try to help |
Beta Was this translation helpful? Give feedback.
-
Example with mutation for my app
|
Beta Was this translation helpful? Give feedback.
Yes everything works as expected. From your code I can see
Rewrite to