Repository navigation
Fix [Parent(requires:)] dropped for resolvers declared on interface types - #9823
michaelstaib merged 3 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds support for propagating [Parent(requires: ...)] field requirements when the resolver is declared on an interface, with regression tests to validate projection behavior.
Changes:
- Added Data.Tests coverage for interface-declared vs object-declared
[Parent(requires: ...)]projection behavior. - Updated
InterfaceFieldDescriptorto register field requirement metadata from[Parent(requires: ...)]parameters. - Shifted
RequirementsTypeInterceptorhook fromOnBeforeCompleteTypetoOnAfterCompleteType.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/HotChocolate/Data/test/Data.Tests/ParentRequiresInterfaceProjectionTests.cs | New regression tests validating projection behavior for interface vs object field resolvers using [Parent(requires: ...)]. |
| src/HotChocolate/Core/src/Types/Types/Descriptors/InterfaceFieldDescriptor.cs | Registers requirement metadata for interface field resolvers so implementing object types can honor projections. |
| src/HotChocolate/Core/src/Types/Execution/Requirements/RequirementsTypeInterceptor.cs | Changes interceptor lifecycle hook timing for requirements processing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
033f103 to
c03405a
Compare
|
I am still polishing a bit here ... pulling your the requirements handling so that there are no duplications ... but this one will go in later today. |
faa05d1 to
fc390ab
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9823 +/- ##
============================
============================
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Fixes #9822 and adds associated tests.