{"record":{"id":"f5a79febeaed07fd","repo":"cube-js/cube","slug":"querytype-query-type-is-not-supported-by-the","errorCode":null,"errorMessage":"'${queryType}' query type is not supported by the client.Please update the client.","messagePattern":"'(.+?)' query type is not supported by the client\\.Please update the client\\.","errorType":"validation","errorClass":"UserError","httpStatus":null,"severity":"error","filePath":"packages/cubejs-api-gateway/src/gateway.ts","lineNumber":2126,"sourceCode":"\n      if (!Array.isArray(query) && query.responseFormat) {\n        resType = query.responseFormat;\n      }\n\n      this.log({\n        type: 'Load Request',\n        apiType,\n        query\n      }, context);\n\n      const [queryType, normalizedQueries] =\n        await this.getNormalizedQueries(query, context, false, false, cacheMode);\n\n      if (\n        queryType !== QueryTypeEnum.REGULAR_QUERY &&\n        props.queryType == null\n      ) {\n        throw new UserError(\n          `'${queryType\n          }' query type is not supported by the client.` +\n          'Please update the client.'\n        );\n      }\n\n      let metaConfigResult = await (await this\n        .getCompilerApi(context)).metaConfig(request.context, {\n        requestId: context.requestId\n      });\n\n      metaConfigResult = this.filterVisibleItemsInMeta(context, metaConfigResult);\n\n      const sqlQueries = await this.getSqlQueriesInternal(context, normalizedQueries);\n\n      let slowQuery = false;\n\n      const results = await Promise.all(","sourceCodeStart":2108,"sourceCodeEnd":2144,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/packages/cubejs-api-gateway/src/gateway.ts#L2108-L2144","documentation":"When the submitted query resolves to a non-regular query type (e.g. a data blending array query, compare-date-range, or multi-query), the API response shape changes. Old clients that expect a plain ResultSet cannot handle it, so ApiGateway throws this UserError unless the client explicitly signals support via `queryType`. It protects clients from receiving a payload format they cannot parse.","triggerScenarios":"POST /cubejs-api/v1/load with a blended/array query (or other non-REGULAR_QUERY type) from a client that did not set queryType — i.e. queryType !== REGULAR_QUERY and props.queryType == null. Sending queryType explicitly suppresses the error.","commonSituations":"Upgrading the server or data model to use data blending while the frontend still runs an older @cubejs-client/core that doesn't declare queryType; hand-rolled fetch calls to /load with array queries that bypass the official client; stale cached client bundles after a version upgrade.","solutions":["Upgrade @cubejs-client/core (and framework wrappers) to a version that supports the query type and sends queryType.","Explicitly pass queryType in the request (e.g. queryType: 'blendingQuery' when loading an array of queries).","If the client can't be upgraded, split the request into separate regular queries and merge client-side."],"exampleFix":"// before\nawait cubeApi.load([{ measures: ['a.c'] }, { measures: ['b.c'] }]); // old client, no queryType\n// after\nawait cubeApi.load([{ measures: ['a.c'] }, { measures: ['b.c'] }], { queryType: 'blendingQuery' });","handlingStrategy":"type-guard","validationCode":"const SUPPORTED = new Set(['regular', 'blendingQuery']);\nif (Array.isArray(query) && !SUPPORTED.has(queryTypeSent)) throw new Error('Upgrade @cubejs-client or pass queryType explicitly for non-regular queries');","typeGuard":"function clientSupportsQueryType(res: unknown): res is { queryType: string } {\n  return typeof res === 'object' && res !== null && 'queryType' in res;\n}","tryCatchPattern":"try {\n  return await cubeApi.load(query);\n} catch (e) {\n  if (String(e?.message).includes('query type is not supported by the client')) {\n    console.error('Client too old for this query type — upgrade @cubejs-client/core');\n    throw e;\n  }\n  throw e;\n}","preventionTips":["Keep @cubejs-client/core and framework wrappers on the same version as recent server releases.","Always pass explicit queryType when loading array/blended queries.","Add a CI check that the frontend client version supports every query type the app emits."],"tags":["client-version","rest-api","data-blending","compatibility"],"backgroundTag":"client-server-version-mismatch","analyzedSha":"7d981676b36392fec34088b9afab6bdcad40207c","analyzedAt":"2026-09-02T03:45:10.400Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}