Skip to content

mostViewedVideosConnection: Apply filters before limit #82

@Lezek123

Description

@Lezek123

In Orion v1 the filters (where conditions) provided to mostViewedVideosConnection were applied after the limit, ie.:

  1. First the ids of limit number of most viewed videos were retrieved
  2. 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:

  1. First apply the where conditions
  2. Then return the limit most viewed videos among those that matched those where conditions

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions