From 215553792b9f62918f3138b193e7c1791055283d Mon Sep 17 00:00:00 2001 From: Oli Juhl <59018053+olivermrbl@users.noreply.github.com> Date: Sun, 23 Feb 2025 21:42:19 +0800 Subject: [PATCH] chore: Force select-in strategy by passing pagination through (#11556) * chore: Force select-in by passing pagination through * chore: Force select-in by passing pagination through --- packages/core/modules-sdk/src/remote-query/query.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/core/modules-sdk/src/remote-query/query.ts b/packages/core/modules-sdk/src/remote-query/query.ts index e132065cc8..9e28f3a24a 100644 --- a/packages/core/modules-sdk/src/remote-query/query.ts +++ b/packages/core/modules-sdk/src/remote-query/query.ts @@ -224,13 +224,21 @@ export class Query { pagination, })) as unknown as GraphResultSet - delete queryOptions.pagination delete queryOptions.filters + const graphOptions: RemoteQueryInput = { + ...queryOptions, + pagination: { + // We pass through `take` to force the `select-in` query strategy + // There might be a better way to do this, but for now this should do + take: queryOptions.pagination?.take, + }, + } + let finalResultset: GraphResultSet = indexResponse if (indexResponse.data.length) { - finalResultset = await this.graph(queryOptions, { + finalResultset = await this.graph(graphOptions, { ...options, initialData: indexResponse.data, })