Expand description
Typed GraphQL operations, generic over GraphQl so tests can drive them
with canned JSON.
The field selections here and the structs in super::model have to agree.
ISSUE_FIELDS is shared by every query and mutation that returns an issue
so there is exactly one place where that agreement is maintained.
Structs§
- Assigned
Issue - An issue assigned to the viewer, with just enough cycle context to decide
whether
import --mineshould bring it in. - Issue
Patch - Fields
pushmay change on an existing Linear issue.Nonemeans “leave it alone” — the bridge never writes a field the user did not ask for. - NewIssue
- Fields for a new Linear issue. Only what
push --createsets.
Constants§
- ISSUE_
FIELDS - The issue selection, shared by every operation returning an issue.
Functions§
- assigned_
to_ viewer - Every open issue assigned to the token’s viewer, with cycle context.
- comment_
not_ found - Whether an error from
update_commentmeans the comment no longer exists — i.e. someone deleted it in Linear, and the right move is to create a fresh one rather than fail the push. - create_
comment - Post a comment and return its Linear id — the id is what lets a later push edit the same comment in place rather than append a new one.
- create_
issue - issue_
by_ id - Fetch an issue by its Linear UUID. Used on push, where the link already records the stable id.
- issue_
by_ key - Look an issue up by its human key, e.g.
ENG-412. - parse_
issue_ key - Split
ENG-412into("ENG", 412). - team_
by_ key - A team and its workflow states, for status mapping and issue creation.
- update_
comment - Rewrite an existing comment’s body in place.
- update_
issue