From eb8340960c382519ed244f1a0749fc94da7ded9a Mon Sep 17 00:00:00 2001 From: Tomasz Pluskiewicz Date: Thu, 17 Oct 2024 13:49:49 +0200 Subject: [PATCH] fix: too long queries sent as GET --- .changeset/cold-grapes-shop.md | 5 +++++ apis/shared-dimensions/lib/domain/shared-dimensions.ts | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/cold-grapes-shop.md diff --git a/.changeset/cold-grapes-shop.md b/.changeset/cold-grapes-shop.md new file mode 100644 index 000000000..959551fd8 --- /dev/null +++ b/.changeset/cold-grapes-shop.md @@ -0,0 +1,5 @@ +--- +"@cube-creator/shared-dimensions-api": patch +--- + +Querying hierarchies could cause `414 (URI Too Long)` error (re #1544) diff --git a/apis/shared-dimensions/lib/domain/shared-dimensions.ts b/apis/shared-dimensions/lib/domain/shared-dimensions.ts index 8c3971ae7..306afb34b 100644 --- a/apis/shared-dimensions/lib/domain/shared-dimensions.ts +++ b/apis/shared-dimensions/lib/domain/shared-dimensions.ts @@ -86,7 +86,9 @@ export async function getSharedTerms({ s } const { constructQuery } = await shapeToQuery() - return constructQuery(shape).execute(client) as any + return constructQuery(shape).execute(client, { + operation: 'postDirect', + }) as any } async function loadShape(shape: string) {