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 ( at n ( at Object._apiRequest ( at Object.fetchCollection ( at Object._fetchCollection ( at Object.fetchCollection ( at async Object.syncCollection ( at async Proxy.sync ( at async Proxy.saveConfig ("

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

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

const query = { "query": {
  "measures": [

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