-
Notifications
You must be signed in to change notification settings - Fork 9
Filter for DependenciesList and DependentsList
#5267
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
Open
thomasdax98
wants to merge
11
commits into
main
Choose a base branch
from
thomasdax98/deps-list-filter
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
4c730f3
Add filtering by name, secondaryInformation, type and visibility to D…
thomasdax98 233fe55
Fix type filters
thomasdax98 56e0974
Wrap columns in useMemo as done by generator
thomasdax98 a781dc5
Update docs
thomasdax98 ad343bc
Fix filter for dependents and dependencies
thomasdax98 e95d45a
Remove unnecessary library export
thomasdax98 b5458c5
Add breaking changes to changeset
thomasdax98 e747a7c
Merge remote-tracking branch 'origin/next' into thomasdax98/deps-list…
thomasdax98 2cdb940
Check string filters for undefined and null
thomasdax98 f3c9e9f
Check visible filter for undefined and null
thomasdax98 690f5a0
Skip empty and/or filter arrays in dependencies query
thomasdax98 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| --- | ||
| "@comet/cms-admin": major | ||
| "@comet/cms-api": major | ||
| "@comet/admin": minor | ||
| --- | ||
|
|
||
| Add filtering and sorting to `DependenciesList` and `DependentsList` | ||
|
|
||
| Users can now filter dependencies/dependents by name, type, secondary information, and visibility, and sort by all columns. A default filter shows only visible items. The `GqlFilter` type is now exported from `@comet/admin`. | ||
|
|
||
| **Breaking changes:** | ||
|
|
||
| **`@comet/cms-api`:** `DependencyFilter.targetGraphqlObjectType` and `DependentFilter.rootGraphqlObjectType` changed from `string` to `StringFilter`. Update any code passing a plain string to use `{ equal: "..." }` instead. | ||
|
|
||
| **`@comet/cms-admin`:** The GQL queries passed to `DependenciesList` and `DependentsList` must now accept `$filter` and `$sort` variables and forward them to the `dependencies`/`dependents` field. Update your queries as follows: | ||
|
|
||
| ```graphql | ||
| # DependentsList | ||
| query MyDependents($id: ID!, $offset: Int!, $limit: Int!, $forceRefresh: Boolean = false, $filter: DependentFilter, $sort: [DependencySort!]) { | ||
| item: myEntity(id: $id) { | ||
| id | ||
| dependents(offset: $offset, limit: $limit, forceRefresh: $forceRefresh, filter: $filter, sort: $sort) { | ||
| nodes { | ||
| rootGraphqlObjectType | ||
| rootId | ||
| rootColumnName | ||
| jsonPath | ||
| name | ||
| secondaryInformation | ||
| visible | ||
| } | ||
| totalCount | ||
| } | ||
| } | ||
| } | ||
|
|
||
| # DependenciesList | ||
| query MyDependencies($id: ID!, $offset: Int!, $limit: Int!, $forceRefresh: Boolean = false, $filter: DependencyFilter, $sort: [DependencySort!]) { | ||
| item: myEntity(id: $id) { | ||
| id | ||
| dependencies(offset: $offset, limit: $limit, forceRefresh: $forceRefresh, filter: $filter, sort: $sort) { | ||
| nodes { | ||
| targetGraphqlObjectType | ||
| targetId | ||
| rootColumnName | ||
| jsonPath | ||
| name | ||
| secondaryInformation | ||
| visible | ||
| } | ||
| totalCount | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I deliberately didn't add these changes to the migration guide since I'm 99% sure these apis aren't used in any real project so it would just unnecessarily prolong the guide. But maybe it doesn't matter since the primary target are AI agents.
What do you think, should I add it?