ChilliCream / graphql-platform

Welcome to the home of the Hot Chocolate GraphQL server for .NET, the Strawberry Shake GraphQL client for .NET and Banana Cake Pop the awesome Monaco based GraphQL IDE.
https://chillicream.com
MIT License
4.96k stars 722 forks source link

Allow for pattern matching with the IsSelectedAttribute. #7061

Closed michaelstaib closed 1 month ago

michaelstaib commented 1 month ago

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)
codecov[bot] commented 1 month ago

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.

:exclamation: 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 :warning:
...Parameters/IsSelectedParameterExpressionBuilder.cs 0.00% 22 Missing :warning:
...HotChocolate/Core/src/Types/SchemaBuilder.Setup.cs 78.26% 5 Missing :warning:
...xecution/Processing/MiddlewareContext.Selection.cs 0.00% 4 Missing :warning:
.../src/Types/Types/Attributes/IsSelectedAttribute.cs 0.00% 4 Missing :warning:
...c/Execution/Processing/EmptySelectionCollection.cs 0.00% 3 Missing :warning:
.../Types/Configuration/Validation/SchemaValidator.cs 60.00% 2 Missing :warning:
...nfiguration/Validation/ObjectTypeValidationRule.cs 75.00% 1 Missing :warning:
...sions/ProjectionObjectFieldDescriptorExtensions.cs 66.66% 1 Missing :warning:
Additional details and impacted files ```diff @@ 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](https://app.codecov.io/gh/ChilliCream/graphql-platform/pull/7061/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ChilliCream) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/ChilliCream/graphql-platform/pull/7061/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ChilliCream) | `72.13% <31.50%> (+0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ChilliCream#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

github-actions[bot] commented 1 month ago

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](mailto:qodana-support@jetbrains.com) - Or via our issue tracker: https://jb.gg/qodana-issue - Or share your feedback: https://jb.gg/qodana-discussions