Skip to content

feat: add composite type support for field resolvers#2368

Merged
Noroth merged 16 commits intomainfrom
ludwig/eng-8297-add-interface-support-for-field-resolvers
Dec 8, 2025
Merged

feat: add composite type support for field resolvers#2368
Noroth merged 16 commits intomainfrom
ludwig/eng-8297-add-interface-support-for-field-resolvers

Conversation

@Noroth
Copy link
Copy Markdown
Contributor

@Noroth Noroth commented Nov 26, 2025

This PR adds support for using composite type in field resolvers.

Summary by CodeRabbit

  • New Features

    • Project.criticalDeadline — fetch upcoming milestones or project end dates within a configurable window.
    • Project.topPriorityItem — surface the highest-priority item (task, milestone, or project) with optional category filtering.
  • Bug Fixes

    • Improved handling of list/multi-valued resolver arguments.
    • QueryProject now returns nil for not-found cases instead of an error.
  • Tests

    • Greatly expanded coverage for field-resolver scenarios, lists, nested contexts, fragments, aliases and edge cases.
  • Chores

    • Updated prerelease dependency entries.

✏️ Tip: You can customize this high-level summary in your review settings.

Checklist

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Nov 26, 2025

Walkthrough

Adds two computed Project fields (criticalDeadline, topPriorityItem) with service implementations, fixes resolver-argument generation for repeated types in protographic, expands tests in router and protographic suites, and bumps graphql-go-tools dependency pins in router modules.

Changes

Cohort / File(s) Summary
GraphQL Schema
demo/pkg/subgraphs/projects/src/schema.graphql
Added criticalDeadline(withinDays: Int): Timestamped and topPriorityItem(category: String): ProjectSearchResult computed fields on Project with @connect__fieldResolver directives.
Service Implementation
demo/pkg/subgraphs/projects/src/service/service.go
Added ResolveProjectCriticalDeadline and ResolveProjectTopPriorityItem methods implementing deadline-window selection and top-priority resolution (task → milestone → project) with optional category filtering and relationship population; QueryProject now returns nil when not found.
Protographic Generator
protographic/src/sdl-to-proto-visitor.ts
createResolverRequestMessage now spreads full ProtoType (including isRepeated) from getProtoTypeFromGraphQL, ensuring resolver argument fields preserve repeated/multi-valued semantics.
Protographic Tests
protographic/tests/sdl-to-proto/13-field-arguments.test.ts
Added tests validating generated proto for field-resolver contexts that return lists and nested list wrappers.
Router Tests — deps
router-tests/go.mod
Bumped github.com/wundergraph/graphql-go-tools/v2 require entry from v2.0.0-rc.239 to v2.0.0-rc.240; minor comment formatting.
Router Integration Tests
router-tests/grpc_subgraph_test.go, router-tests/router_plugin_test.go
Added extensive test cases covering topPriorityItem and criticalDeadline across fragments, unions, aliases, multiple projects, and category/completion edge cases.
Router — deps
router/go.mod
Bumped github.com/wundergraph/graphql-go-tools/v2 require entry from v2.0.0-rc.239 to v2.0.0-rc.240.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Pay extra attention to:
    • demo/.../service/service.go: correctness of priority fallback logic, date-window math (including use of absolute delta), and implications of returning nil from QueryProject.
    • protographic/src/sdl-to-proto-visitor.ts: repeated-field handling and proto field numbering when spreading ProtoType.
    • Large test additions in router-tests/* and protographic/tests/*: ensure expectations align with resolver behavior and schema changes.

Possibly related PRs

Pre-merge checks

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: add composite type support for field resolvers' accurately describes the main change in the pull request, which adds support for composite types in field resolvers across schema, service, code generation, and tests.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c12a279 and 6f58dad.

⛔ Files ignored due to path filters (2)
  • router-tests/go.sum is excluded by !**/*.sum
  • router/go.sum is excluded by !**/*.sum
📒 Files selected for processing (2)
  • router-tests/go.mod (2 hunks)
  • router/go.mod (1 hunks)
🧰 Additional context used
🧠 Learnings (8)
📓 Common learnings
Learnt from: SkArchon
Repo: wundergraph/cosmo PR: 2252
File: router-tests/telemetry/telemetry_test.go:9684-9693
Timestamp: 2025-10-01T20:39:16.113Z
Learning: Repo preference: In router-tests/telemetry/telemetry_test.go, keep strict > 0 assertions for request.operation.*Time (parsingTime, normalizationTime, validationTime, planningTime) in telemetry-related tests; do not relax to >= 0 unless CI flakiness is observed.
Learnt from: StarpTech
Repo: wundergraph/cosmo PR: 2157
File: router-tests/go.mod:16-16
Timestamp: 2025-08-20T22:13:25.222Z
Learning: github.com/mark3labs/mcp-go v0.38.0 has regressions and should not be used in the wundergraph/cosmo project. v0.36.0 is the stable version that should be used across router-tests and other modules.
📚 Learning: 2025-08-20T22:13:25.222Z
Learnt from: StarpTech
Repo: wundergraph/cosmo PR: 2157
File: router-tests/go.mod:16-16
Timestamp: 2025-08-20T22:13:25.222Z
Learning: github.com/mark3labs/mcp-go v0.38.0 has regressions and should not be used in the wundergraph/cosmo project. v0.36.0 is the stable version that should be used across router-tests and other modules.

Applied to files:

  • router/go.mod
  • router-tests/go.mod
📚 Learning: 2025-09-24T12:54:00.765Z
Learnt from: endigma
Repo: wundergraph/cosmo PR: 2222
File: router-tests/websocket_test.go:2238-2302
Timestamp: 2025-09-24T12:54:00.765Z
Learning: The wundergraph/cosmo project uses Go 1.25 (Go 1.23+ minimum), so fmt.Appendf and other newer Go standard library functions are available and can be used without compatibility concerns.

Applied to files:

  • router/go.mod
  • router-tests/go.mod
📚 Learning: 2025-09-24T12:54:00.765Z
Learnt from: endigma
Repo: wundergraph/cosmo PR: 2222
File: router-tests/websocket_test.go:2238-2302
Timestamp: 2025-09-24T12:54:00.765Z
Learning: The wundergraph/cosmo project uses Go 1.25 (Go 1.25 minimum), so fmt.Appendf and other newer Go standard library functions are available and can be used without compatibility concerns.

Applied to files:

  • router/go.mod
  • router-tests/go.mod
📚 Learning: 2025-10-01T20:39:16.113Z
Learnt from: SkArchon
Repo: wundergraph/cosmo PR: 2252
File: router-tests/telemetry/telemetry_test.go:9684-9693
Timestamp: 2025-10-01T20:39:16.113Z
Learning: Repo preference: In router-tests/telemetry/telemetry_test.go, keep strict > 0 assertions for request.operation.*Time (parsingTime, normalizationTime, validationTime, planningTime) in telemetry-related tests; do not relax to >= 0 unless CI flakiness is observed.

Applied to files:

  • router-tests/go.mod
📚 Learning: 2025-08-15T10:21:45.838Z
Learnt from: StarpTech
Repo: wundergraph/cosmo PR: 2142
File: helm/cosmo/Chart.yaml:0-0
Timestamp: 2025-08-15T10:21:45.838Z
Learning: In the WunderGraph Cosmo project, helm chart version upgrades and README badge synchronization are handled in separate helm release PRs, not in the initial version bump PRs.

Applied to files:

  • router-tests/go.mod
📚 Learning: 2025-08-20T10:08:17.857Z
Learnt from: endigma
Repo: wundergraph/cosmo PR: 2155
File: router/core/router.go:1857-1866
Timestamp: 2025-08-20T10:08:17.857Z
Learning: router/pkg/config/config.schema.json forbids null values for traffic_shaping.subgraphs: additionalProperties references $defs.traffic_shaping_subgraph_request_rule with type "object". Therefore, in core.NewSubgraphTransportOptions, dereferencing each subgraph rule pointer is safe under schema-validated configs, and a nil-check is unnecessary.

Applied to files:

  • router-tests/go.mod
📚 Learning: 2025-11-19T15:13:57.821Z
Learnt from: dkorittki
Repo: wundergraph/cosmo PR: 2273
File: router/core/graphql_handler.go:0-0
Timestamp: 2025-11-19T15:13:57.821Z
Learning: In the Cosmo router (wundergraph/cosmo), error handling follows a two-phase pattern: (1) Prehandler phase handles request parsing, validation, and setup errors using `httpGraphqlError` and `writeOperationError` (in files like graphql_prehandler.go, operation_processor.go, parse_multipart.go, batch.go); (2) Execution phase handles resolver execution errors using `WriteError` in GraphQLHandler.ServeHTTP. Because all `httpGraphqlError` instances are caught in the prehandler before ServeHTTP is invoked, any error type checks for `httpGraphqlError` in the execution-phase WriteError method are unreachable code.

Applied to files:

  • router-tests/go.mod
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: integration_test (./events)
  • GitHub Check: integration_test (./. ./fuzzquery ./lifecycle ./modules)
  • GitHub Check: integration_test (./telemetry)
  • GitHub Check: image_scan (nonroot)
  • GitHub Check: image_scan
  • GitHub Check: build_test
  • GitHub Check: build_push_image (nonroot)
  • GitHub Check: build_push_image
  • GitHub Check: Analyze (go)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (5)
router/go.mod (2)

34-34: Verify graphql-go-tools/v2 rc.240 changelog and release status.

The version bump from rc.239 to rc.240 should align with the PR's focus on composite type support and resolver-argument generation fixes. Since the PR description mentions using a temporary engine version for CI testing, confirm whether rc.240 is officially released or still a development candidate, and document the specific changes from rc.239 that enable this feature.


76-76: Confirmed: mark3labs/mcp-go at correct stable version.

The dependency is pinned to v0.36.0, which is the stable version per project standards. Based on learnings, v0.38.0 has known regressions and should not be used.

router-tests/go.mod (3)

16-16: Confirm mark3labs/mcp-go version is stable.

The dependency on mark3labs/mcp-go v0.36.0 is correct. As per project learnings, v0.38.0 has regressions and should be avoided.


212-212: Comment formatting change is cosmetic.

The space added after // in the commented replace directive on line 212 is a formatting change only and does not affect module resolution behavior. This is acceptable as a readability improvement.


30-30: graphql-go-tools v2.0.0-rc.240 is correctly aligned with the router module.

Both router/go.mod and router-tests/go.mod are updated to the same prerelease version (rc.240), ensuring consistency across the critical modules. The commented replace directives indicate that local module development is available but not currently active, which is the correct configuration for using the published version. The version bump is appropriate for this PR.


Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Nov 26, 2025

Router-nonroot image scan passed

✅ No security vulnerabilities found in image:

ghcr.io/wundergraph/cosmo/router:sha-d5225795831ebaba779dde4b7d45f44351e594ea-nonroot

@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@d23f439). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2368   +/-   ##
=======================================
  Coverage        ?   32.01%           
=======================================
  Files           ?      213           
  Lines           ?    23242           
  Branches        ?        0           
=======================================
  Hits            ?     7442           
  Misses          ?    14877           
  Partials        ?      923           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Noroth Noroth marked this pull request as ready for review December 2, 2025 09:41
@Noroth Noroth requested a review from JivusAyrus December 2, 2025 09:41
@Noroth
Copy link
Copy Markdown
Contributor Author

Noroth commented Dec 2, 2025

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Dec 2, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
demo/pkg/subgraphs/projects/src/service/service.go (2)

1198-1213: Avoid returning (nil, nil) from QueryProject gRPC handler — it causes marshal failure

Returning (nil, nil) from a gRPC handler is invalid. The gRPC contract states that error == nil signals an OK status, but the server still attempts to marshal the response. When the response is nil, the encode path fails — resulting in a marshal error or runtime panic. The client receives an error and no response, violating the handler's contract.

Return a concrete response object instead:

-    }
-
-    return nil, nil
+    }
+
+    return &service.QueryProjectResponse{Project: nil}, nil

This preserves the "not found → null, no error" behavior while maintaining the gRPC invariant that error == nil pairs with a marshalable response.


5-211: Use signed date difference to correctly handle "upcoming" deadline semantics

ResolveProjectCriticalDeadline computes:

daysUntil := int(math.Abs(endDate.Sub(now).Hours() / 24))

This treats past and future deadlines identically. Any milestone or project within withinDays of "now"—whether expired or upcoming—will match. This contradicts the code comment "Find the nearest upcoming deadline that's within the specified days" and the function's purpose.

All fixture milestones and projects have EndDate values in the past (e.g., 2021–2025-08-20), so this behavior will return expired deadlines as "critical" when they should be ignored.

Replace math.Abs with a signed difference to fix:

daysUntil := int(endDate.Sub(now).Hours() / 24)
// Then check: daysUntil >= 0 && daysUntil <= withinDays

This ensures only upcoming deadlines are considered critical.

🧹 Nitpick comments (1)
protographic/src/sdl-to-proto-visitor.ts (1)

1291-1301: Propagating full ProtoType into resolver context message is correct

Using ...this.getProtoTypeFromGraphQL(field.type) here lets buildMessage honor isRepeated, so context fields for list‑typed parent fields (including nested/wrapper cases) are now emitted with the right repeated/wrapper semantics. This aligns with the new tests around list contexts.

You may also want to apply the same pattern to the Resolve*Args message above so list‑typed resolver arguments, if introduced later, are also emitted as repeated rather than scalar.

Based on learnings, this still keeps resolver request/response messages independent of the proto lock, as they’re only built via buildMessage and never reconciled via ProtoLockManager.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9be1a0e and 8f30a0a.

⛔ Files ignored due to path filters (7)
  • demo/pkg/subgraphs/projects/generated/mapping.json is excluded by !**/generated/**
  • demo/pkg/subgraphs/projects/generated/service.pb.go is excluded by !**/*.pb.go, !**/generated/**
  • demo/pkg/subgraphs/projects/generated/service.proto is excluded by !**/generated/**
  • demo/pkg/subgraphs/projects/generated/service.proto.lock.json is excluded by !**/generated/**
  • demo/pkg/subgraphs/projects/generated/service_grpc.pb.go is excluded by !**/*.pb.go, !**/generated/**
  • router-tests/go.sum is excluded by !**/*.sum
  • router/go.sum is excluded by !**/*.sum
📒 Files selected for processing (8)
  • demo/pkg/subgraphs/projects/src/schema.graphql (1 hunks)
  • demo/pkg/subgraphs/projects/src/service/service.go (3 hunks)
  • protographic/src/sdl-to-proto-visitor.ts (1 hunks)
  • protographic/tests/sdl-to-proto/13-field-arguments.test.ts (1 hunks)
  • router-tests/go.mod (2 hunks)
  • router-tests/grpc_subgraph_test.go (1 hunks)
  • router-tests/router_plugin_test.go (1 hunks)
  • router/go.mod (1 hunks)
🧰 Additional context used
🧠 Learnings (9)
📚 Learning: 2025-10-27T09:45:41.622Z
Learnt from: Noroth
Repo: wundergraph/cosmo PR: 2290
File: protographic/src/sdl-to-proto-visitor.ts:1350-1390
Timestamp: 2025-10-27T09:45:41.622Z
Learning: In protographic/src/sdl-to-proto-visitor.ts, resolver-related messages (created by `createResolverRequestMessage` and `createResolverResponseMessage`) are special messages that should not be tracked in the proto lock file, unlike other message types.

Applied to files:

  • protographic/tests/sdl-to-proto/13-field-arguments.test.ts
  • protographic/src/sdl-to-proto-visitor.ts
📚 Learning: 2025-10-01T20:39:16.113Z
Learnt from: SkArchon
Repo: wundergraph/cosmo PR: 2252
File: router-tests/telemetry/telemetry_test.go:9684-9693
Timestamp: 2025-10-01T20:39:16.113Z
Learning: Repo preference: In router-tests/telemetry/telemetry_test.go, keep strict > 0 assertions for request.operation.*Time (parsingTime, normalizationTime, validationTime, planningTime) in telemetry-related tests; do not relax to >= 0 unless CI flakiness is observed.

Applied to files:

  • router-tests/grpc_subgraph_test.go
  • router-tests/router_plugin_test.go
  • router-tests/go.mod
📚 Learning: 2025-09-17T20:55:39.456Z
Learnt from: SkArchon
Repo: wundergraph/cosmo PR: 2172
File: router/core/graph_server.go:0-0
Timestamp: 2025-09-17T20:55:39.456Z
Learning: The Initialize method in router/internal/retrytransport/manager.go has been updated to properly handle feature-flag-only subgraphs by collecting subgraphs from both routerConfig.GetSubgraphs() and routerConfig.FeatureFlagConfigs.ConfigByFeatureFlagName, ensuring all subgraphs receive retry configuration.

Applied to files:

  • router-tests/grpc_subgraph_test.go
📚 Learning: 2025-08-20T22:13:25.222Z
Learnt from: StarpTech
Repo: wundergraph/cosmo PR: 2157
File: router-tests/go.mod:16-16
Timestamp: 2025-08-20T22:13:25.222Z
Learning: github.com/mark3labs/mcp-go v0.38.0 has regressions and should not be used in the wundergraph/cosmo project. v0.36.0 is the stable version that should be used across router-tests and other modules.

Applied to files:

  • router/go.mod
  • router-tests/go.mod
📚 Learning: 2025-09-24T12:54:00.765Z
Learnt from: endigma
Repo: wundergraph/cosmo PR: 2222
File: router-tests/websocket_test.go:2238-2302
Timestamp: 2025-09-24T12:54:00.765Z
Learning: The wundergraph/cosmo project uses Go 1.25 (Go 1.23+ minimum), so fmt.Appendf and other newer Go standard library functions are available and can be used without compatibility concerns.

Applied to files:

  • router/go.mod
  • router-tests/go.mod
📚 Learning: 2025-09-24T12:54:00.765Z
Learnt from: endigma
Repo: wundergraph/cosmo PR: 2222
File: router-tests/websocket_test.go:2238-2302
Timestamp: 2025-09-24T12:54:00.765Z
Learning: The wundergraph/cosmo project uses Go 1.25 (Go 1.25 minimum), so fmt.Appendf and other newer Go standard library functions are available and can be used without compatibility concerns.

Applied to files:

  • router/go.mod
  • router-tests/go.mod
📚 Learning: 2025-09-10T09:53:42.914Z
Learnt from: JivusAyrus
Repo: wundergraph/cosmo PR: 2156
File: studio/src/pages/[organizationSlug]/[namespace]/graph/[slug]/checks/index.tsx:189-197
Timestamp: 2025-09-10T09:53:42.914Z
Learning: In protobuf-generated TypeScript code, repeated fields (arrays) are always initialized with default empty arrays and cannot be undefined, making defensive programming checks like `|| []` or optional chaining unnecessary for these fields.

Applied to files:

  • protographic/src/sdl-to-proto-visitor.ts
📚 Learning: 2025-08-20T10:08:17.857Z
Learnt from: endigma
Repo: wundergraph/cosmo PR: 2155
File: router/core/router.go:1857-1866
Timestamp: 2025-08-20T10:08:17.857Z
Learning: router/pkg/config/config.schema.json forbids null values for traffic_shaping.subgraphs: additionalProperties references $defs.traffic_shaping_subgraph_request_rule with type "object". Therefore, in core.NewSubgraphTransportOptions, dereferencing each subgraph rule pointer is safe under schema-validated configs, and a nil-check is unnecessary.

Applied to files:

  • router-tests/go.mod
📚 Learning: 2025-11-19T15:13:57.821Z
Learnt from: dkorittki
Repo: wundergraph/cosmo PR: 2273
File: router/core/graphql_handler.go:0-0
Timestamp: 2025-11-19T15:13:57.821Z
Learning: In the Cosmo router (wundergraph/cosmo), error handling follows a two-phase pattern: (1) Prehandler phase handles request parsing, validation, and setup errors using `httpGraphqlError` and `writeOperationError` (in files like graphql_prehandler.go, operation_processor.go, parse_multipart.go, batch.go); (2) Execution phase handles resolver execution errors using `WriteError` in GraphQLHandler.ServeHTTP. Because all `httpGraphqlError` instances are caught in the prehandler before ServeHTTP is invoked, any error type checks for `httpGraphqlError` in the execution-phase WriteError method are unreachable code.

Applied to files:

  • router-tests/go.mod
🧬 Code graph analysis (2)
protographic/tests/sdl-to-proto/13-field-arguments.test.ts (2)
protographic/src/index.ts (1)
  • compileGraphQLToProto (53-79)
protographic/tests/util.ts (1)
  • expectValidProto (29-31)
demo/pkg/subgraphs/projects/src/service/service.go (3)
demo/pkg/subgraphs/projects/src/data/projects.go (3)
  • GetMilestonesByProjectID (169-177)
  • GetProjectByID (159-166)
  • GetTasksByProjectID (180-188)
demo/pkg/subgraphs/projects/src/data/milestones.go (1)
  • PopulateMilestoneRelationships (210-226)
demo/pkg/subgraphs/projects/src/data/tasks.go (1)
  • PopulateTaskRelationships (326-349)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: build_push_image
  • GitHub Check: build_push_image (nonroot)
  • GitHub Check: build_test
  • GitHub Check: integration_test (./telemetry)
  • GitHub Check: integration_test (./. ./fuzzquery ./lifecycle ./modules)
  • GitHub Check: Analyze (go)
🔇 Additional comments (6)
protographic/tests/sdl-to-proto/13-field-arguments.test.ts (1)

106-296: Good coverage for resolver context list and nested list handling

The two added cases validate:

  • simple non‑nullable list context fields (posts: [Post!]!) becoming repeated Post posts in both context and base messages, and
  • nullable / nested list contexts using ListOfPost and ListOfListOfCategory wrappers consistently.

Together with expectValidProto, this is a solid regression net around the new resolver‑context generation behavior.

router-tests/router_plugin_test.go (1)

378-438: Plugin-side integration tests thoroughly cover new field resolvers

The added TestRouterPluginRequests cases for topPriorityItem and criticalDeadline (including category filtering, milestone vs task vs project fallback, nested fragments, and aliases) match the service logic and ensure the plugin path exercises the new resolvers end‑to‑end. No issues spotted.

demo/pkg/subgraphs/projects/src/schema.graphql (1)

108-114: Schema wiring for new Project field resolvers looks consistent

criticalDeadline and topPriorityItem are correctly typed:

  • criticalDeadline(withinDays: Int): Timestamped matches the Timestamped interface implemented by both Project and Milestone.
  • topPriorityItem(category: String): ProjectSearchResult matches the ProjectSearchResult union.

The resolver contexts ("id status milestones" and "id status") reference existing fields on Project and align with how the service methods consume Id and Status. No issues from the SDL side.

router-tests/grpc_subgraph_test.go (1)

181-235: GRPC subgraph tests mirror plugin resolver scenarios effectively

The added cases for topPriorityItem and criticalDeadline (including category filters, fallback to project, nested interface/union fragments, and aliasing) give the gRPC subgraph path the same coverage as the router‑plugin tests, which is valuable for catching divergences between the two execution paths. The expected payloads align with the new service logic.

router/go.mod (1)

34-34: graphql-go-tools/v2 versions are synchronized across router and router-tests

Both router/go.mod (line 34) and router-tests/go.mod (line 30) reference v2.0.0-rc.239.0.20251202082452-79629bfd1d55, keeping the critical dependency aligned. This consistency is important for test reliability.

router-tests/go.mod (1)

30-30: Dependency versions are correct and aligned

graphql-go-tools/v2 is at the same version as router/go.mod (v2.0.0-rc.239.0.20251202082452-79629bfd1d55), and mcp-go remains at the stable v0.36.0 as required.

@Noroth
Copy link
Copy Markdown
Contributor Author

Noroth commented Dec 2, 2025

Using temporary engine version to test CI

Comment thread demo/pkg/subgraphs/projects/src/service/service.go
Comment thread protographic/src/sdl-to-proto-visitor.ts
Copy link
Copy Markdown
Contributor

@StarpTech StarpTech left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants