#GelDB client code is loaded on client side

2 messages · Page 1 of 1 (latest)

ancient lichen
#

GelDB's entire client code is being loaded on the client side. I have ensured that createClient is being called only on the server side but getting this code loaded on the client side.
There is a chunk which has following code so I know that it's GelDB query and client code.

function pa(e) {
    return e.querySingle(`select User {
  *,
  organization:{
    name,
    @role
  }
}
filter .identity = (global ext::auth::ClientTokenIdentity);`)
#

In my current build the chunk is q-BDq8epGv.js which has this code and it looks like even(along with others) theme-toggle component is causing it to load on client side.
This chunk q-BDq8epGv.js has total 27 occurrences in my manifest file.
Here is theme-toggle chunk snippets from q-manifest.json

"q-BdzZLmai.js": {
  "size": 1054,
  "total": 11482586,
  "imports": [
  "q-B-p554so.js",
  "q-BaPofGDK.js",
  "q-BDq8epGv.js",
  "q-CbLhudAY.js",
  "q-CFApxFuu.js",
  "q-CmfZKuNA.js",
  "q-CSSuaQCU.js",
  "q-Cy1Hl1qK.js",
  "q-DFk0WzK8.js",
  "q-h35wzY40.js",
  "q-vYQjLfTP.js"
  ],
  "origins": [
  "src/components/common/theme-toggle.tsx_theme_toggle_component_7I4ty9ksq0o.js",
  "src/components/common/theme-toggle.tsx_theme_toggle_component_useVisibleTask_cAdz13LaJ0A.js"
  ],
  "symbols": [
  "s_7I4ty9ksq0o",
  "s_cAdz13LaJ0A"
  ],
  "interactivity": 3
 }