Skip to content

Extract aliased project mutation primitive#2923

Draft
zwick wants to merge 1 commit into
zwick-extract-projects-resolver-refactorfrom
zwick-extract-projects-batch-mutation
Draft

Extract aliased project mutation primitive#2923
zwick wants to merge 1 commit into
zwick-extract-projects-resolver-refactorfrom
zwick-extract-projects-batch-mutation

Conversation

@zwick

@zwick zwick commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the package-local aliased GraphQL mutation primitive used by #2903, isolated from batch orchestration.

Why

This draft is stacked on #2922 so the batch implementation can be reviewed as a linear set of focused changes.

What changed

  • Build and cache bounded positional reflected mutation types for update and clear operations.
  • Execute mutations through the existing githubv4.Client, preserving partial-data outcomes and testing GraphQL error classification directly.

MCP impact

  • No tool or API changes
  • Tool schema or behavior changed
  • New tool added

Prompts tested (tool changes only)

  • N/A

Security / limits

  • No security or limits impact
  • Auth / permissions considered
  • Data exposure, filtering, or token/size limits considered

Tool renaming

  • I am renaming tools as part of this PR (e.g. a part of a consolidation effort)
    • I have added the new tool aliases in deprecated_tool_aliases.go
  • I am not renaming tools as part of this PR

Lint & tests

  • Linted locally with ./script/lint
  • Tested locally with ./script/test

Docs

  • Not needed
  • Updated (README / docs / examples)

@zwick zwick self-assigned this Jul 21, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: d7dc302d-e6f2-41e9-a2c8-ed598de47067
@zwick
zwick force-pushed the zwick-extract-projects-batch-mutation branch from a69dd2d to a7b9cf3 Compare July 21, 2026 20:32
@zwick
zwick requested a review from Copilot July 21, 2026 20:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an internal GraphQL primitive for bounded, aliased project-item mutations while preserving partial results.

Changes:

  • Builds and caches reflected update/clear mutation types.
  • Executes up to 20 aliased mutations and classifies GraphQL errors.
  • Adds focused mutation construction and execution tests.
Show a summary per file
File Description
pkg/github/projects_batch_mutation.go Implements aliased mutation construction and execution.
pkg/github/projects_batch_mutation_test.go Tests caching, aliases, limits, and error classification.

Review details

  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Medium

}
}

mutateErr := gqlClient.Mutate(ctx, mutationPtr.Interface(), inputs[0], variables)
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.

2 participants