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

Allow for pattern matching with the IsSelectedAttribute. #7061

Merged
merged 5 commits into from Apr 16, 2024

Conversation

michaelstaib
Copy link
Member

This PR allows for more complex selection expressions with the is selected attribute.
Now we can match for patterns instead of single fields.

public User GetUser([IsSelected("email category { ... on Category { next { name } } }")] bool isSelected)

@michaelstaib michaelstaib changed the title Allow for selection set syntax in IsSelectedAttribute. Allow for pattern matching with the IsSelectedAttribute. Apr 15, 2024
Copy link

codecov bot commented Apr 15, 2024

Codecov Report

Attention: Patch coverage is 31.50685% with 100 lines in your changes are missing coverage. Please review.

Project coverage is 72.13%. Comparing base (38de4ac) to head (a2c1f1a).
Report is 1 commits behind head on main.

❗ Current head a2c1f1a differs from pull request most recent head 056b235. Consider uploading reports for the commit 056b235 to get more accurate results

Files Patch % Lines
...re/src/Execution/Processing/SelectionCollection.cs 0.00% 58 Missing ⚠️
...Parameters/IsSelectedParameterExpressionBuilder.cs 0.00% 22 Missing ⚠️
...HotChocolate/Core/src/Types/SchemaBuilder.Setup.cs 78.26% 5 Missing ⚠️
...xecution/Processing/MiddlewareContext.Selection.cs 0.00% 4 Missing ⚠️
.../src/Types/Types/Attributes/IsSelectedAttribute.cs 0.00% 4 Missing ⚠️
...c/Execution/Processing/EmptySelectionCollection.cs 0.00% 3 Missing ⚠️
.../Types/Configuration/Validation/SchemaValidator.cs 60.00% 2 Missing ⚠️
...nfiguration/Validation/ObjectTypeValidationRule.cs 75.00% 1 Missing ⚠️
...sions/ProjectionObjectFieldDescriptorExtensions.cs 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7061      +/-   ##
==========================================
+ Coverage   72.11%   72.13%   +0.01%     
==========================================
  Files        2621     2616       -5     
  Lines      130781   130609     -172     
==========================================
- Hits        94316    94218      -98     
+ Misses      36465    36391      -74     
Flag Coverage Δ
unittests 72.13% <31.50%> (+0.01%) ⬆️

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.

Copy link

github-actions bot commented Apr 15, 2024

Qodana for .NET

3 new problems were found

Inspection name Severity Problems
Return type of a function can be non-nullable 🔶 Warning 1
Type member is never used (private accessibility) 🔶 Warning 1
Unused parameter (private accessibility) 🔶 Warning 1

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

@michaelstaib michaelstaib self-assigned this Apr 16, 2024
@michaelstaib michaelstaib merged commit 94d0339 into main Apr 16, 2024
9 of 10 checks passed
@michaelstaib michaelstaib deleted the mst/isselected-improvements branch April 16, 2024 10:13
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.

None yet

1 participant