In Orion v1 the filters (where conditions) provided to mostViewedVideosConnection were applied after the limit, ie.:
- First the ids of
limit number of most viewed videos were retrieved
- Then
id_in (https://github.com/Joystream/orion/blob/master/src/resolvers/queryNodeStitchingResolvers/helpers.ts#L37) was added to the provided where conditions to produce the final query
In Orion v2 the query is expected to work differently:
- First apply the where conditions
- Then return the
limit most viewed videos among those that matched those where conditions