From bb18ee79b477a508a3935d2e95cb93d3afaacbf4 Mon Sep 17 00:00:00 2001 From: andrewwallacespeckle Date: Mon, 18 Aug 2025 15:29:34 +0100 Subject: [PATCH] fix(fe): preload navigationWorkspaceSwitcherQuery --- packages/frontend-2/plugins/060-dataPreload.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/frontend-2/plugins/060-dataPreload.ts b/packages/frontend-2/plugins/060-dataPreload.ts index 2cfdb2564..9dcef834f 100644 --- a/packages/frontend-2/plugins/060-dataPreload.ts +++ b/packages/frontend-2/plugins/060-dataPreload.ts @@ -5,6 +5,7 @@ import { } from '~/lib/auth/graphql/queries' import { usePreloadApolloQueries } from '~/lib/common/composables/graphql' import { mainServerInfoDataQuery } from '~/lib/core/composables/server' +import { navigationWorkspaceSwitcherQuery } from '~/lib/navigation/graphql/queries' /** * Prefetches data for specific routes to avoid the problem of serial API requests @@ -26,7 +27,17 @@ export default defineNuxtPlugin(async (ctx) => { // Standard/global promises.push( preload({ - queries: [{ query: activeUserQuery }, { query: mainServerInfoDataQuery }] + queries: [ + { query: activeUserQuery }, + { query: mainServerInfoDataQuery }, + ...(isWorkspacesEnabled.value + ? [ + { + query: navigationWorkspaceSwitcherQuery + } + ] + : []) + ] }) )