-
Notifications
You must be signed in to change notification settings - Fork 3
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
fix(graphql): Add SystemLabel search filter #1767
fix(graphql): Add SystemLabel search filter #1767
Conversation
📝 WalkthroughWalkthroughThis pull request introduces a new filtering capability for dialogs by adding a Changes
Possibly related issues
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this 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
🧹 Nitpick comments (4)
src/Digdir.Domain.Dialogporten.GraphQL/EndUser/Common/ObjectTypes.cs (1)
121-127
: Add GraphQLDescription attributes for consistency.Other enums in this file have GraphQLDescription attributes that provide valuable context in the GraphQL schema. Consider adding descriptions for the SystemLabel values:
public enum SystemLabel { + [GraphQLDescription("Default system label for dialogs")] Default = 1, + [GraphQLDescription("Indicates that the dialog has been moved to bin")] Bin = 2, + [GraphQLDescription("Indicates that the dialog has been archived")] Archive = 3 }src/Digdir.Domain.Dialogporten.GraphQL/EndUser/SearchDialogs/ObjectTypes.cs (1)
107-109
: Enhance the GraphQLDescription for better clarity.Consider providing more context in the description about the available system labels and their purpose:
- [GraphQLDescription("Filter by system label")] + [GraphQLDescription("Filter dialogs by system label (Default, Bin, Archive). Multiple labels can be specified to include dialogs with any of the specified labels.")] public List<SystemLabel>? SystemLabel { get; init; }docs/schema/V1/schema.verified.graphql (2)
299-300
: Enhance the field documentation comment.The documentation comment for the systemLabel field could be more descriptive to better explain its purpose and valid values.
Consider updating the comment to:
- "Filter by system label" + "Filter dialogs by system label (DEFAULT, BIN, ARCHIVE). Multiple values can be provided to include dialogs with any of the specified labels."
Line range hint
1-461
: Schema integrity is well maintained.The addition of the systemLabel filter maintains schema integrity with:
- Consistent type usage across queries and mutations
- Proper enum definition and error handling
- Appropriate authorization controls
Consider adding integration tests to verify:
- The new filter works with other existing filters
- The filter handles empty arrays correctly
- Performance impact of filtering by system label
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
docs/schema/V1/schema.verified.graphql
(2 hunks)src/Digdir.Domain.Dialogporten.GraphQL/EndUser/Common/ObjectTypes.cs
(1 hunks)src/Digdir.Domain.Dialogporten.GraphQL/EndUser/DialogById/ObjectTypes.cs
(0 hunks)src/Digdir.Domain.Dialogporten.GraphQL/EndUser/MutationTypes/ObjectTypes.cs
(1 hunks)src/Digdir.Domain.Dialogporten.GraphQL/EndUser/SearchDialogs/MappingProfile.cs
(1 hunks)src/Digdir.Domain.Dialogporten.GraphQL/EndUser/SearchDialogs/ObjectTypes.cs
(1 hunks)
💤 Files with no reviewable changes (1)
- src/Digdir.Domain.Dialogporten.GraphQL/EndUser/DialogById/ObjectTypes.cs
🔇 Additional comments (3)
src/Digdir.Domain.Dialogporten.GraphQL/EndUser/SearchDialogs/MappingProfile.cs (1)
14-14
: LGTM! Clean and consistent mapping configuration.The SystemLabel mapping follows the same pattern as other properties and is correctly configured.
src/Digdir.Domain.Dialogporten.GraphQL/EndUser/MutationTypes/ObjectTypes.cs (1)
1-2
: LGTM! Good refactoring of SystemLabel enum.Moving the SystemLabel enum to Common namespace improves code organization as it's used across multiple features.
docs/schema/V1/schema.verified.graphql (1)
461-461
: LGTM!The formatting change to the UUID scalar specification URL is purely cosmetic and maintains the same functionality.
🤖 I have created a release *beep* *boop* --- ## [1.47.6](v1.47.5...v1.47.6) (2025-01-31) ### Bug Fixes * **graphql:** Add SystemLabel search filter ([#1767](#1767)) ([431c529](431c529)) ### Miscellaneous Chores * **deps:** update dependency vitest to v3.0.4 ([#1769](#1769)) ([e43b119](e43b119)) * Test 0.5 sampler ratio in yt01 ([#1770](#1770)) ([cd69edb](cd69edb)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Description
Related Issue(s)
Verification
Documentation
docs
-directory, Altinnpedia or a separate linked PR in altinn-studio-docs., if applicable)