What happened?
linearis milestones create always fails with a GraphQL variable error, and linearis milestones update silently sends incorrect variables. The root cause is that graphql/mutations/project-milestones.graphql declares top-level scalar variables, but src/services/milestone-service.ts passes them wrapped as { input } — every other create/update mutation in the codebase uses the $input convention, so milestone-service.ts is correct and the .graphql file is the odd one out.
Expected behavior
linearis milestones create --project <uuid> "My Milestone" creates the milestone and returns the created object as JSON. linearis milestones update <ms-id> --name "new name" updates only the fields that were provided.
Steps to reproduce
linearis milestones create "My Milestone" --project <project-uuid>
Actual output
After `npm run generate`, the existing `client.request(CreateProjectMilestoneDocument, { input })` in `milestone-service.ts` becomes type-correct end-to-end, matching `createProject`, `createInitiative`, etc.
Suggested test addition (mirrors the `listMilestones` variable assertions):
it("passes input as a top-level GraphQL variable", async () => {
const client = mockGqlClient({
projectMilestoneCreate: {
success: true,
projectMilestone: { id: "ms-new", name: "v2.0", description: null, targetDate: null, sortOrder: 0 },
},
});
const input = { projectId: "proj-1", name: "v2.0", description: "desc", targetDate: "2025-12-01" };
await createMilestone(client, input);
expect(client.request).toHaveBeenCalledWith(expect.anything(), { input });
});
Linearis version
2026.4.9
Node.js version
v22.22.2
Operating system
Linux
Authentication method
~/.linearis/token (linearis auth login)
Additional context
graphql/mutations/project-milestones.graphql is the only mutation file in the repo that declares top-level scalar variables rather than the $input: <Type>Input! shape used everywhere else. But src/services/milestone-service.ts calls the document with { input } — which is the convention every other service uses (createProject, createInitiative, createIssue, …):
Suggest: Align project-milestones.graphql with the rest of the codebase by taking a single $input argument.
# graphql/mutations/project-milestones.graphql (proposed)
mutation CreateProjectMilestone($input: ProjectMilestoneCreateInput!) {
projectMilestoneCreate(input: $input) {
success
projectMilestone { ... }
}
}
mutation UpdateProjectMilestone(
$id: String!
$input: ProjectMilestoneUpdateInput!
) {
projectMilestoneUpdate(id: $id, input: $input) {
success
projectMilestone { ... }
}
}
What happened?
linearis milestones createalways fails with a GraphQL variable error, andlinearis milestones updatesilently sends incorrect variables. The root cause is thatgraphql/mutations/project-milestones.graphqldeclares top-level scalar variables, butsrc/services/milestone-service.tspasses them wrapped as{ input }— every other create/update mutation in the codebase uses the$inputconvention, somilestone-service.tsis correct and the.graphqlfile is the odd one out.Expected behavior
linearis milestones create --project <uuid> "My Milestone"creates the milestone and returns the created object as JSON.linearis milestones update <ms-id> --name "new name"updates only the fields that were provided.Steps to reproduce
Actual output
Linearis version
2026.4.9
Node.js version
v22.22.2
Operating system
Linux
Authentication method
~/.linearis/token (linearis auth login)
Additional context
graphql/mutations/project-milestones.graphqlis the only mutation file in the repo that declares top-level scalar variables rather than the$input: <Type>Input!shape used everywhere else. Butsrc/services/milestone-service.tscalls the document with{ input }— which is the convention every other service uses (createProject,createInitiative,createIssue, …):Suggest: Align
project-milestones.graphqlwith the rest of the codebase by taking a single$inputargument.