MCPcopy
hub / github.com/TanStack/query / setupDevtools

Function setupDevtools

packages/vue-query/src/devtools/devtools.ts:17–255  ·  view source on GitHub ↗
(app: any, queryClient: QueryClient)

Source from the content-addressed store, hash-verified

15const pluginName = 'Vue Query'
16
17export function setupDevtools(app: any, queryClient: QueryClient) {
18 setupDevtoolsPlugin(
19 {
20 id: pluginId,
21 label: pluginName,
22 packageName: 'vue-query',
23 homepage: 'https://tanstack.com/query/latest',
24 logo: 'https://raw.githubusercontent.com/TanStack/query/main/packages/vue-query/media/vue-query.svg',
25 app,
26 settings: {
27 baseSort: {
28 type: 'choice',
29 component: 'button-group',
30 label: 'Sort Cache Entries',
31 options: [
32 {
33 label: 'ASC',
34 value: 1,
35 },
36 {
37 label: 'DESC',
38 value: -1,
39 },
40 ],
41 defaultValue: 1,
42 },
43 sortFn: {
44 type: 'choice',
45 label: 'Sort Function',
46 options: Object.keys(sortFns).map((key) => ({
47 label: key,
48 value: key,
49 })),
50 defaultValue: Object.keys(sortFns)[0]!,
51 },
52 onlineMode: {
53 type: 'choice',
54 component: 'button-group',
55 label: 'Online mode',
56 options: [
57 {
58 label: 'Online',
59 value: 1,
60 },
61 {
62 label: 'Offline',
63 value: 0,
64 },
65 ],
66 defaultValue: 1,
67 },
68 },
69 },
70 (api) => {
71 const initialSettings = api.getSettings()
72 onlineManager.setOnline(Boolean(initialSettings.onlineMode.valueOf()))
73
74 const queryCache = queryClient.getQueryCache()

Callers 2

beforeCreateFunction · 0.90
vueQueryPlugin.tsFile · 0.90

Calls 14

getQueryStateLabelFunction · 0.90
getQueryStatusFgFunction · 0.90
getQueryStatusBgFunction · 0.90
setOnlineMethod · 0.80
getQueryCacheMethod · 0.80
getMethod · 0.80
setStateMethod · 0.80
getObserversCountMethod · 0.80
fetchMethod · 0.45
invalidateQueriesMethod · 0.45
resetMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…