Skip to content
Source
Sign inSign up
TanStack/query

vue-query: Timeline events do not seem to show up in vue.js devtools #5704

Send to my agent
Closeduki00a(GitHub profile, opens in a new tab) opened this issue 2 comments

Describe the bug

Hi! Firstly, thanks for your work on this awesome project!

I've encountered a problem that timeline events do not show up in the timeline view of the Vue.js devtools.

Your minimal, reproducible example

https://lg0pn5-5173.csb.app/

Steps to reproduce

  1. Install Vue.js devtools
  2. Go to the above URL
  3. Open Vue.js devtools

Expected behavior

Timeline events show up in the Timeline view

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

  • OS: macOS
  • Browser: Chrome
  • vue.js devtools: v6.5.0
  • vue: v3.3.4

Tanstack Query adapter

vue-query

TanStack Query version

4.29.20

TypeScript version

v4.9.3

Additional context

This issue seems to be caused by a mismatch in event types:

I applied the following patch using patch-package and the problem was resolved in my local environment:

diff --git a/node_modules/@tanstack/vue-query/build/lib/devtools/devtools.mjs b/node_modules/@tanstack/vue-query/build/lib/devtools/devtools.mjs
index cac888d..c982674 100644
--- a/node_modules/@tanstack/vue-query/build/lib/devtools/devtools.mjs
+++ b/node_modules/@tanstack/vue-query/build/lib/devtools/devtools.mjs
@@ -85,7 +85,7 @@ function setupDevtools(app, queryClient) {
       api.sendInspectorState(pluginId);

       if ( // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
-      event && ['queryAdded', 'queryRemoved', 'queryUpdated'].includes(event.type)) {
+      event && ['added', 'removed', 'updated'].includes(event.type)) {
         api.addTimelineEvent({
           layerId: pluginId,
           event: {
  1. oh yeah we've renamed the events with v4 - I didn't know we had this check. Can you raise a PR to fix this please? Your changeset looks correct!

  2. TkDodo added labelsbug

  3. TkDodo added labelspackage: vue-query

  4. TkDodo added labelspackage: query-devtools

  5. TkDodo closed this

Sign in to join this conversation.