Skip to content

refactor(resolvers): migrate ID resolvers to GraphQLClient and drop Linear SDK - #261

Merged
iamfj merged 1 commit into
nextfrom
issue-209
Jul 3, 2026
Merged

refactor(resolvers): migrate ID resolvers to GraphQLClient and drop Linear SDK#261
iamfj merged 1 commit into
nextfrom
issue-209

Conversation

@iamfj

@iamfj iamfj commented Jul 3, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Migrates every ID resolver off LinearSdkClient onto GraphQLClient + generated GraphQL operations/types, preserving all lookup order, disambiguation, and error behavior. Adds lean FindUsers/FindIssues/FindIssueLabels lookup queries (reusing the existing Find* queries for teams, projects, labels, statuses, cycles, and initiatives), rewires all command callers (ctx.sdkctx.gql), and removes the now-unused LinearSdkClient and @linear/sdk dependency. Resolver tests now mock GraphQLClient.request one layer deep.

Closes #209

Type of change

  • Bug fix
  • New feature
  • Refactor (no behavior change)
  • Documentation
  • Tests
  • Build / CI

Checklist

  • npm run check:ci passes (lint + format)
  • npx tsc --noEmit passes (type check)
  • npm test passes (unit tests)
  • New code has tests (happy path + primary error case)
  • Commit messages follow Conventional Commits

Testing

npm run generate, npm run check:ci, npx tsc --noEmit, npm test (849 passing), npm run build, and npm run knip (clean — no dangling @linear/sdk dep or LinearSdkClient) all pass.

Notes for reviewers

Behavior-preserving. The issue resolver is notably simpler because GraphQL returns team inline, removing the SDK's PromiseLike/relation-projection handling. resolveMilestoneId dropped its SDK client param (project now resolved via GraphQL). No changes to src/gql/ (generated, git-ignored).

…inear SDK

Move every ID resolver off LinearSdkClient onto GraphQLClient and generated
GraphQL operations/types, keeping all lookup, disambiguation, and error
behavior. Add lean FindUsers/FindIssues/FindIssueLabels lookup queries;
reuse the existing Find* lookups for teams, projects, labels, statuses,
cycles, and initiatives. Update all command callers (ctx.sdk -> ctx.gql),
remove the sdk client from CommandContext, delete LinearSdkClient, and drop
the now-unused @linear/sdk dependency. Rewrite resolver tests to mock
GraphQLClient.request one layer deep.

Closes #209
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

✅ knip — no dead code

No unused files, exports, types, or dependencies detected.

@iamfj
iamfj merged commit 9e63f6b into next Jul 3, 2026
12 checks passed
@iamfj
iamfj deleted the issue-209 branch July 3, 2026 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

deps: migrate ID resolvers from LinearSdkClient to GraphQLClient

1 participant