Permit filter work item widgets by type on GraphQL
Currently, every time we load a work item and select any widget data we load all the widgets related to that work item, even if we don't want to use all every widget related to the WorkItem. To avoid that, we're introducing two possible ways to filter the widgets of a work item: - types_except: where we list widget types that we don't want on the result. This might be useful on places where we want all the Widgets except one or two, like on the main WorkItem UI, where we load the notes widget after loading the whole work item. - types_in: where we list only the widget types desired on the result. This might be useful as the secong query on the main WorkItem UI, where we want to load just the notes for the WorkItem, or on WorkItems lists where we usually just want to list a small set of widgets. Related to: https://gitlab.com/gitlab-org/gitlab/-/issues/521310 Changelog: changed
显示
- app/graphql/types/work_item_type.rb 13 个添加, 1 个删除app/graphql/types/work_item_type.rb
- app/models/work_item.rb 23 个添加, 8 个删除app/models/work_item.rb
- app/models/work_items/widget_definition.rb 4 个添加, 0 个删除app/models/work_items/widget_definition.rb
- doc/api/graphql/reference/_index.md 13 个添加, 1 个删除doc/api/graphql/reference/_index.md
- spec/models/work_item_spec.rb 68 个添加, 5 个删除spec/models/work_item_spec.rb
- spec/requests/api/graphql/work_item_spec.rb 58 个添加, 0 个删除spec/requests/api/graphql/work_item_spec.rb
加载中
想要评论请 注册 或 登录