Add linkable_upstreams field to Maven Virtual Registry GraphQL API
## Problem Currently, the frontend implementation for linking existing upstreams to Maven Virtual Registries (#559014) fetches all upstreams for a root group and then filters out the ones already associated with the registry on the client side. This approach works but is not optimal for performance. The current implementation: 1. Fetches first 20 upstreams for a root group 2. Filters out upstreams already associated with the registry on the frontend 3. Shows only linkable upstreams in the dropdown ## Solution Optimize the backend API by adding a `linkable_upstreams` field to the GraphQL `MavenRegistryDetailsType` that returns only the upstreams that can be linked to a specific registry. This would: - Reduce data transfer by only sending relevant upstreams - Improve performance by moving the filtering logic to the backend - Simplify frontend logic - Better support pagination and search functionality ## Implementation Details Since the page already uses `Query.virtualRegistriesPackagesMavenRegistry`, this can be achieved by: 1. Adding a `linkable_upstreams` field to the [`MavenRegistryDetailsType`](https://gitlab.com/gitlab-org/gitlab/-/blob/a4dc3bc3d35ec6fe6cec7593743bd65660e456c6/ee/app/graphql/types/virtual_registries/packages/maven/registry_details_type.rb) 2. Implementing the backend logic to filter out upstreams already associated with the registry 3. Supporting pagination and search parameters for the linkable upstreams ## Related Issues - #559014 - UX: Link existing upstream flow in Maven Virtual Registries (parent issue) - #561675 - Backend: Add search by upstream name functionality ## Benefits - **Performance**: Reduced payload size and client-side processing - **Scalability**: Better handling of large numbers of upstreams - **User Experience**: Faster loading and more responsive UI - **Maintainability**: Cleaner separation of concerns between frontend and backend
issue