We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4110a8b commit 237e909Copy full SHA for 237e909
src/resolvers/search.ts
@@ -191,6 +191,15 @@ export default function createSearchResolver<TSource, TContext>(
191
}
192
193
const res: any = await searchFC.resolve(rp.source, args, rp.context, rp.info);
194
+ if (typeof res.aggregations === 'undefined') {
195
+ res.aggregations = res.body.aggregations;
196
+ }
197
+ if (typeof res.took === 'undefined') {
198
+ res.took = res.body.took;
199
200
+ if (typeof res.timed_out === 'undefined') {
201
+ res.timed_out = res.body.timed_out;
202
203
if (typeof res.hits === 'undefined') {
204
res.count =
205
typeof res.body.hits.total?.value === 'number'
0 commit comments