Skip to content

Add node IDs to project resolver results#2922

Open
zwick wants to merge 2 commits into
mainfrom
zwick-extract-projects-resolver-refactor
Open

Add node IDs to project resolver results#2922
zwick wants to merge 2 commits into
mainfrom
zwick-extract-projects-resolver-refactor

Conversation

@zwick

@zwick zwick commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Small prerequisite refactor: the project resolver helpers now surface GraphQL node IDs for project items and fields.

Why

Split out of #2903 to keep that PR reviewable. An upcoming change performs batched project-item writes and needs the item/field node IDs exposed here.

What changed

  • Add NodeID to ResolvedField, populated for all three field variants in listAllProjectFields.
  • Refactor resolveProjectItemIDByIssueNumber into a thin wrapper over a new resolveProjectItemByIssueNumber (returns the item node ID alongside its database ID), which delegates to resolveProjectItemByIssueNumberWithProjectID for an already-resolved project ID. The projectItems query now selects the item node ID.

MCP impact

  • No tool or API changes

Prompts tested (tool changes only)

N/A - internal resolver refactor, no tool changes.

Security / limits

  • No security or limits impact

Tool renaming

  • 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

Split out of #2903 as a small prerequisite refactor.

- Add a NodeID field to ResolvedField, populated for all three field
  variants in listAllProjectFields.
- Refactor resolveProjectItemIDByIssueNumber into a thin wrapper over a
  new resolveProjectItemByIssueNumber that also returns the item node ID,
  delegating to resolveProjectItemByIssueNumberWithProjectID for an
  already-resolved project ID. The projectItems query now selects the
  item node ID alongside its full database ID.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 89f897b0-115f-4435-a071-46fb6c49be86
Copilot AI review requested due to automatic review settings July 21, 2026 19:07
@zwick
zwick requested a review from a team as a code owner July 21, 2026 19:07

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

Exposes GraphQL node IDs from internal project field and item resolvers for upcoming batched writes.

Changes:

  • Adds node IDs to all resolved project field variants.
  • Adds item resolution helpers returning both node and database IDs.
  • Updates pagination tests for item node IDs.
Show a summary per file
File Description
pkg/github/projects_resolver.go Adds field and item node-ID resolution.
pkg/github/projects_resolver_test.go Updates item resolver query fixtures and assertions.

Review details

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

Comment thread pkg/github/projects_resolver.go
Comment thread pkg/github/projects_resolver_test.go
@zwick
zwick marked this pull request as draft July 21, 2026 19:34
@zwick zwick self-assigned this Jul 21, 2026
…rename item resolver test

- Assert field.NodeID in Test_ResolveProjectFieldByName_Success.
- Add Test_ResolveProjectFieldByName_NodeIDsForAllVariants covering
  single-select, iteration, and generic fields (asserts NodeID + DataType).
- Rename Test_ResolveProjectItemIDByIssueNumber_Success to
  Test_ResolveProjectItemByIssueNumber_Success to match the resolver it calls.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 89f897b0-115f-4435-a071-46fb6c49be86

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.

Review details

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

@zwick
zwick marked this pull request as ready for review July 21, 2026 20:38
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