fix(linear): comment history query declares its variables with the types Linear expects - #105
Open
as-cto wants to merge 1 commit into
Open
fix(linear): comment history query declares its variables with the types Linear expects#105as-cto wants to merge 1 commit into
as-cto wants to merge 1 commit into
Conversation
…pes Linear expects
`PaseoIssueCommentHistory` declared `$issueId: String!` and `$before: DateTime!`, but uses
them in `issue: { id: { eq: $issueId } }` (an `IDComparator`, which expects `ID`) and
`createdAt: { lt: $before }` (a `DateComparator`, which expects `DateTimeOrDuration`). Linear
rejects the document at validation time (`Variable "$issueId" of type "String!" used in
position expecting type "ID"`), so every comment-thread hydration failed and agents answered
without the previous turns of the thread. Observed on a self-hosted hub; replaying the query
with `ID!` and `DateTimeOrDuration!` succeeds. The `PaseoComment` mutation keeps `String!`:
`CommentCreateInput.issueId` is a `String`.
The `DateTimeOrDuration` half is already carried by getpaseo#88; this commit makes the query valid on
main on its own.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PaseoIssueCommentHistorydeclares$issueId: String!and$before: DateTime!, but uses them where Linear's schema expectsID(IDComparator.eq) andDateTimeOrDuration(DateComparator.lt). Linear rejects the document at validation time:So every comment-thread hydration fails (
linear.issue.history.hydrate failedon each comment run) and the agent answers without the previous turns of the thread. Observed on a self-hosted hub against a real workspace; replaying the same query withID!andDateTimeOrDuration!succeeds.PaseoCommentkeepsString!, sinceCommentCreateInput.issueIdis aString.The
DateTimeOrDurationhalf is already in #88 (reported there earlier); this PR makes the query valid onmainon its own and merges cleanly ahead of or after #88. Test asserts both variable types and the filter position.Validation:
vitest run src/providers/linear/client.test.ts(8 passed),oxfmt --check,oxlinton the two files.