Skip to content

Add cursor-based pagination support #43

@iamfj

Description

@iamfj

Problem

The --limit option only fetches the first N items. Pagination via cursor (after/before) is not supported, preventing users from iterating through large datasets.

Current State

  • issues list only accepts --limit parameter
  • GraphQL queries use only first argument
  • No after, before, or cursor support
  • Users cannot access results beyond the limit

Expected State

Support cursor-based pagination following Linear GraphQL API specification:

  • --limit for result count (uses first)
  • --after <cursor> to fetch next page
  • --before <cursor> to fetch previous page
  • Response should include pageInfo with hasNextPage, hasPreviousPage, and edge cursors

Impact

  • Users with >50 issues cannot browse beyond default/specified limit
  • Automation scripts cannot reliably paginate through results
  • API inconsistency vs. Linear GraphQL capabilities

Technical Notes

  • Requires updates to GraphQL queries to include after, before parameters and pageInfo fields
  • Service layer needs to accept and pass pagination parameters
  • CLI commands need new options for --after and --before

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions