Problem trying to connect cubejs API

Hi there,

I’m trying to connect my cubejs but I get this error when fetching the data:

Screenshot 2023-09-15 at 8.19.39 PM

stack: "TypeError: (e || []).reduce is not a function at i (https://cdn.weweb.io/components/2bd1c688-31c5-443e-ae25-59aa5b6431fb/71a9bc8c-1b5c-4c18-b218-0089504e1b24/dist/manager.js:1:27060) at n (https://cdn.weweb.io/components/2bd1c688-31c5-443e-ae25-59aa5b6431fb/71a9bc8c-1b5c-4c18-b218-0089504e1b24/dist/manager.js:1:26971) at Object._apiRequest (https://cdn.weweb.io/components/2bd1c688-31c5-443e-ae25-59aa5b6431fb/71a9bc8c-1b5c-4c18-b218-0089504e1b24/dist/manager.js:1:25982) at Object.fetchCollection (https://cdn.weweb.io/components/2bd1c688-31c5-443e-ae25-59aa5b6431fb/71a9bc8c-1b5c-4c18-b218-0089504e1b24/dist/manager.js:1:25224) at Object._fetchCollection (https://editor-cdn.weweb.io/public/js/index.c9c628c5.js:1270:35524) at Object.fetchCollection (https://editor-cdn.weweb.io/public/js/index.c9c628c5.js:1270:36260) at async Object.syncCollection (https://editor-cdn.weweb.io/public/js/index.c9c628c5.js:1270:37918) at async Proxy.sync (https://editor-cdn.weweb.io/public/js/index.c9c628c5.js:1388:135236) at async Proxy.saveConfig (https://editor-cdn.weweb.io/public/js/index.c9c628c5.js:1388:134149)"

message: "(e || []).reduce is not a function"

This is what I’m sending as a query string:

const query = { "query": {
  "measures": [
    "wiselo.clicks"
  ],
}
}

return query

Any idea on how to get it right?

Thank you!

I do not know this API, but apparently a function is excepting an array and receive something which is not an array