Reproducer
$ linear tasks --all --cycle next
Error: Cannot query field "nextCycle" on type "Team".
Root cause
linear line 615 and line 690 build the GraphQL query with team.nextCycle:
# line 615 (list_tasks)
cycle_field = "activeCycle" if args.cycle != "next" else "nextCycle"
# line 690 (show_board) — same pattern
cycle_field = "activeCycle" if args.cycle != "next" else "nextCycle"
But the project itself already documents that this field does not exist — linear line 238, in the cycle-resolution helper:
# "next" — Linear has no team.nextCycle field. Find the first cycle whose
# startsAt is after the active cycle's endsAt, ordered ascending.
The helper (lines 240–274) does the right thing: query activeCycle.endsAt, then cycles(filter: { startsAt: { gte: $after } }, orderBy: updatedAt, first: 20) and take the earliest.
list_tasks and show_board never call that helper — they go straight to the non-existent nextCycle field on Team and Linear's GraphQL rejects the query.
Fix
Resolve the next-cycle ID with the existing helper (or factor it out), then change both query bodies to filter issues by cycle: { id: { eq: $cycleId } } instead of nesting under team.<cycle_field>.
Impact
Anyone doing weekly triage who wants to see what's coming up next gets a confusing GraphQL error instead of a useful list.
Reproducer
Root cause
linearline 615 and line 690 build the GraphQL query withteam.nextCycle:But the project itself already documents that this field does not exist —
linearline 238, in the cycle-resolution helper:The helper (lines 240–274) does the right thing: query
activeCycle.endsAt, thencycles(filter: { startsAt: { gte: $after } }, orderBy: updatedAt, first: 20)and take the earliest.list_tasksandshow_boardnever call that helper — they go straight to the non-existentnextCyclefield onTeamand Linear's GraphQL rejects the query.Fix
Resolve the next-cycle ID with the existing helper (or factor it out), then change both query bodies to filter issues by
cycle: { id: { eq: $cycleId } }instead of nesting underteam.<cycle_field>.Impact
Anyone doing weekly triage who wants to see what's coming up next gets a confusing GraphQL error instead of a useful list.