From 3fea4eeca1fdf5cf6268ae40378682e887a661bf Mon Sep 17 00:00:00 2001 From: Brad Harris Date: Tue, 7 Nov 2023 22:04:14 +0000 Subject: [PATCH] add protobuf classes to query client hydration --- components/dashboard/src/data/setup.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/dashboard/src/data/setup.tsx b/components/dashboard/src/data/setup.tsx index db768a0c61af28..e954ab53a9e4e4 100644 --- a/components/dashboard/src/data/setup.tsx +++ b/components/dashboard/src/data/setup.tsx @@ -16,6 +16,8 @@ import { Message } from "@bufbuild/protobuf"; import { ReactQueryDevtools } from "@tanstack/react-query-devtools"; import { FunctionComponent } from "react"; import debounce from "lodash.debounce"; +// Need to import all the protobuf classes we want to support for hydration +import * as ConfigurationClasses from "@gitpod/public-api/lib/gitpod/v1/configuration_pb"; // This is used to version the cache // If data we cache changes in a non-backwards compatible way, increment this version @@ -137,6 +139,8 @@ function initializeMessages() { ...Object.values(require("@gitpod/public-api/lib/gitpod/v1/organization_pb")), ...Object.values(require("@gitpod/public-api/lib/gitpod/v1/workspace_pb")), ...Object.values(require("@gitpod/public-api/lib/gitpod/v1/pagination_pb")), + ...Object.values(require("@gitpod/public-api/lib/gitpod/v1/pagination_pb")), + ...Object.values(ConfigurationClasses), ]; for (const c of constr) { if ((c as any).prototype instanceof Message) {