• Eulyeon Ko's avatar
    Add IssuesFieldExtension to set relative positions · 5c62b8c8
    Eulyeon Ko authored
    IssuesFieldExtension is a field extension for
    the field issues of the type BoardList.
    The extension is used to check and set
    relative positions of returned issues.
    
    Because IssuesFieldExtension needs to pass
    a paginated list of issues to
    ::Boards::Issues::ListService.initialize_relative_positions
    for performance, the extension needs to execute after
    the underlying issues relation has been wrapped
    by the default pagination connection extension.
    We achieve this by utilizing 'late_extensions'
    on initializing the field.
    
    Previously we incorrectly called initialize_relative_position
    by passing an underlying AR relation rather than
    a paginated result when resolving the field in BoardListIssuesResolver.
    This produced DB queries without `LIMIT` clause -
    causing performance degradations.
    
    Changelog: fixed
    5c62b8c8
connection_shared_examples.rb 262 Bytes