Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Parent Projection Requirements #7431

Merged
merged 5 commits into from
Sep 5, 2024
Merged

Conversation

michaelstaib
Copy link
Member

@michaelstaib michaelstaib commented Sep 4, 2024

This PR allows to declare the requirements of the injected parent object when using the new projections engine.

public async Task<Author> GetAuthorAsync(
    [Parent("AuthorId SomeOtherProp { ChildProp }")]
    Book book,
    AuthorRepository repository,
    CancellationToken cancellationToken)
    ...

Tasks

  • Integrate into SelectionExpressionRewriter
  • Discover and compile requirements during schema building
  • Implement requirements metadata object

Copy link

codecov bot commented Sep 4, 2024

Codecov Report

Attention: Patch coverage is 77.14286% with 80 lines in your changes missing coverage. Please review.

Project coverage is 77.83%. Comparing base (22d0425) to head (b32fba2).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...ate/Core/src/Execution/Projections/PropertyNode.cs 68.62% 32 Missing ⚠️
...e/src/Execution/Projections/PropertyTreeBuilder.cs 52.54% 28 Missing ⚠️
...xecution/Projections/SelectionExpressionBuilder.cs 84.04% 15 Missing ⚠️
...ecution/Projections/RequirementsTypeInterceptor.cs 91.17% 3 Missing ⚠️
...Execution/Projections/FieldRequirementsMetadata.cs 77.77% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7431      +/-   ##
==========================================
- Coverage   78.90%   77.83%   -1.07%     
==========================================
  Files        2447     2825     +378     
  Lines      120428   141630   +21202     
==========================================
+ Hits        95021   110241   +15220     
- Misses      25407    31389    +5982     
Flag Coverage Δ
unittests 77.83% <77.14%> (-1.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@michaelstaib michaelstaib marked this pull request as draft September 4, 2024 21:57
@michaelstaib michaelstaib self-assigned this Sep 4, 2024
@michaelstaib michaelstaib marked this pull request as ready for review September 5, 2024 20:17
@michaelstaib michaelstaib merged commit 8929302 into main Sep 5, 2024
3 checks passed
@michaelstaib michaelstaib deleted the mst/parent-requirements branch September 5, 2024 20:17
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.

1 participant