Skip to content

fix(milestones): use $input convention for milestone mutations - #238

Merged
iamfj merged 2 commits into
nextfrom
issue-223
Jul 2, 2026
Merged

fix(milestones): use $input convention for milestone mutations#238
iamfj merged 2 commits into
nextfrom
issue-223

Conversation

@iamfj

@iamfj iamfj commented Jul 2, 2026

Copy link
Copy Markdown
Member

What does this PR do?

linearis milestones create failed at runtime with a GraphQL variable error and milestones update sent incorrect variables, because project-milestones.graphql was the only mutation file declaring top-level scalar variables while the service passed them under the $input convention used everywhere else. This aligns both CreateProjectMilestone and UpdateProjectMilestone to take a single $input: ...Input! argument and updates the service to pass { input } / { id, input } accordingly.

Closes #223

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

npx tsc --noEmit is clean and npx vitest run tests/unit/services/milestone-service.test.ts passes (12 tests), including two new assertions that create/update forward inputs as single GraphQL variables ({ input } and { id, input }).

Notes for reviewers

src/gql/ is regenerated via npm run generate (gitignored) so the change is type-correct end-to-end.

@iamfj
iamfj marked this pull request as ready for review July 2, 2026 10:17
@iamfj
iamfj enabled auto-merge (squash) July 2, 2026 10:20
iamfj added 2 commits July 2, 2026 12:33
Align CreateProjectMilestone and UpdateProjectMilestone with the
$input argument shape used by every other mutation in the codebase,
fixing the runtime GraphQL variable error on milestone create and
the incorrect variables sent on update.

Closes #223
The #228 guard test asserted milestone mutations pass flat variables, but
#223 aligned CreateProjectMilestone/UpdateProjectMilestone with the $input
convention used by every other mutation. Update the guard to expect the
`{ input }` / `{ id, input }` shape so both fixes agree.

Refs #223, #228
@iamfj
iamfj disabled auto-merge July 2, 2026 10:35
@iamfj
iamfj merged commit 2e0790e into next Jul 2, 2026
9 checks passed
@iamfj
iamfj deleted the issue-223 branch July 2, 2026 10:35
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.

linearis milestone create fails

1 participant