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
This commit is contained in:
1 parent
0c957350a6
commit
215553792b
1 file changed
+10
-2
@@ -224,13 +224,21 @@ export class Query {
|
||||
pagination,
|
||||
})) as unknown as GraphResultSet<TEntry>
|
||||
|
||||
delete queryOptions.pagination
|
||||
delete queryOptions.filters
|
||||
|
||||
const graphOptions: RemoteQueryInput<TEntry> = {
|
||||
...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<TEntry> = indexResponse
|
||||
|
||||
if (indexResponse.data.length) {
|
||||
finalResultset = await this.graph(queryOptions, {
|
||||
finalResultset = await this.graph(graphOptions, {
|
||||
...options,
|
||||
initialData: indexResponse.data,
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user