What problem does this solve?
Resolvers currently depend on LinearSdkClient and SDK methods like client.sdk.teams(...), client.sdk.users(...), and client.sdk.issues(...). This keeps the SDK in the command path and preserves a split architecture where resolvers use one client while services use another.
Proposed solution
Migrate SDK-backed resolvers to GraphQLClient and generated GraphQL operations/types.
Affected files:
src/resolvers/team-resolver.ts
src/resolvers/user-resolver.ts
src/resolvers/issue-resolver.ts
src/resolvers/project-resolver.ts
src/resolvers/label-resolver.ts
src/resolvers/status-resolver.ts
src/resolvers/cycle-resolver.ts
src/resolvers/initiative-resolver.ts
src/resolvers/milestone-resolver.ts
src/resolvers/issue-filter-resolver.ts
Replace:
LinearSdkClient
client.sdk.*
LinearDocument.*
with:
GraphQLClient
client.request(...)
generated query documents and generated filter types
Alternatives considered
- Keep resolver usage on SDK and only remove SDK from transport: not sufficient to remove the dependency.
- Rewrite command flows to use batch resolver queries first: desirable later, but too broad for the dependency-removal migration.
Primary use case
Shell scripting / automation
Additional context
Behavior to preserve:
- UUID passthrough in all resolvers.
- Existing not-found error messages.
- Existing multiple-match handling for users, projects, initiatives, and cycles.
- Cycle disambiguation order: active > next > previous > single match.
- Team lookup order: key first, then name.
- Project
includeArchived option.
- Initiative unscoped, team-scoped, owner-scoped, and team+owner scoped lookup behavior.
- Team and issue estimation context resolution.
Acceptance criteria:
- No resolver imports
LinearSdkClient.
- No resolver imports from
@linear/sdk.
- Resolver tests are updated to mock
GraphQLClient.request one layer deep.
- Existing resolver behavior is covered by unit tests.
What problem does this solve?
Resolvers currently depend on
LinearSdkClientand SDK methods likeclient.sdk.teams(...),client.sdk.users(...), andclient.sdk.issues(...). This keeps the SDK in the command path and preserves a split architecture where resolvers use one client while services use another.Proposed solution
Migrate SDK-backed resolvers to
GraphQLClientand generated GraphQL operations/types.Affected files:
src/resolvers/team-resolver.tssrc/resolvers/user-resolver.tssrc/resolvers/issue-resolver.tssrc/resolvers/project-resolver.tssrc/resolvers/label-resolver.tssrc/resolvers/status-resolver.tssrc/resolvers/cycle-resolver.tssrc/resolvers/initiative-resolver.tssrc/resolvers/milestone-resolver.tssrc/resolvers/issue-filter-resolver.tsReplace:
with:
Alternatives considered
Primary use case
Shell scripting / automation
Additional context
Behavior to preserve:
includeArchivedoption.Acceptance criteria:
LinearSdkClient.@linear/sdk.GraphQLClient.requestone layer deep.