[BE] Return custom work item types through the types provider in GraphQL
Followup based on this [discussion](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/223304#note_3092716902) > Thank you for working on this @daniyalAD :bow: I checkout this out in my gdk and I could finally see the new CWIT is created :yay: That's so exciting :danceduck: > > I just wanted to know that how if the `namespaceWorkItemTypes` query should return the created WIT ? Because I could not see it when I fetched it again :thinking: If not , which backend issue would target it ? ## Summary Update the `TypesFramework::Provider` to return custom work item types in the `namespaceWorkItemTypes` GraphQL query, similar to how system defined types are handled. ## Context - Discussion originated from: !223304 ([comment](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/223304#note_3092716902)) - Related MR for system defined types: !223538 - Related issue for creating custom types: #581937 - Parent epic: &19883 Currently, when a custom work item type (CWIT) is created via the `workItemTypeCreate` mutation, it is not returned by the `namespaceWorkItemTypes` query. This is because the `TypesFramework::Provider` only returns system-defined types. ## Technical Details The following files are relevant for incorporating custom work item types in graphQL: | File | Purpose | |------|---------| | `app/graphql/resolvers/work_items/types_resolver.rb` | GraphQL Resolver - Uses `WorkItems::TypesFinder` to fetch types | | `app/finders/work_items/types_finder.rb` | Finder - Uses `TypesFramework::Provider` to get types | | `app/models/work_items/types_framework/provider.rb` | **Provider (main logic)** - `all_ordered_by_name` method is the entry point for fetching all work item types | | `app/models/work_items/types_filter.rb` | Filter - `allowed_types` method filters which types are available | ## Implementation Approach The `Provider` class at `app/models/work_items/types_framework/provider.rb` is the **single source of truth**. It currently returns system-defined types but needs to be updated to also include custom types from `WorkItems::TypesFramework::Custom::Type`. Follow a similar approach to !223538 (incorporating system defined types into the types provider) to add custom work item types. ## Acceptance Criteria - [ ] Custom work item types created via `workItemTypeCreate` mutation are returned by `namespaceWorkItemTypes` query - [ ] Custom types are properly filtered based on namespace context - [ ] Existing system-defined types behavior is preserved
issue