Skip to content

fix(relation list): paginate forward and inverse relations #61

Description

@dorkitude

Summary

GetIssueRelations claims to return all relations, but it requests one unpaginated page from each of Linear's relations and inverseRelations connections. Linear documents both connections as defaulting to 50 items, so linctl issue relation list silently omits relations after the first 50 in either direction.

Current code

pkg/api/queries.go requests nodes only for each connection. It does not request pageInfo, pass an after cursor, or loop until hasNextPage is false.

Proposed fix

  1. Fetch pageInfo { hasNextPage endCursor } for both connections.
  2. Page independently through forward and inverse connections, preserving the Inverse flag on rows from the latter.
  3. Add API tests with multiple mocked pages for each direction, and a command-level regression test showing that all counterparts appear.

The implementation should not rely on the API default page size; pass an explicit first value and continue until exhausted.

Related: #59 corrected relation direction rendering, but it does not address incomplete result sets.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions