Draft: Add GraphQL for WorkItems::UserPreference
requested to merge kassio/work-items-user-preferences-graphql into kassio/create-work-items-user-preferences-table
What does this MR do and why?
Create work_item_user_preferences table
With the goal to save user preferences by work_item type and namespace we're creating a new table to save the preferences, starting by work_item sorting preference.
Related to: #501712
Changelog: added
References
Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
- Query
query WorkItemUserPreference($namespace: ID!, $work_item_type: WorkItemsTypeID!) {
namespace(fullPath: $namespace) {
workItemUserPreferences(workItemType: $work_item_type) {
nodes {
sort
}
}
}
}
- Update
mutation updateWorkItemPreference($namespace: ID!, $work_item_type: WorkItemsTypeID!, $sort: WorkItemSort) {
workItemUserPreferenceUpdate(
input: {
namespacePath: $namespace,
workItemTypeId: $work_item_type,
sort: $sort
}) {
preferences {
sort
}
}
}
Edited by Kassio Borges