wso2 / wso2/api-platform

MCPProxyRepo: Add project_uuid filter to List and Count queries (before LIMIT/OFFSET)

Open
#1,338 0 comments 0 reactions 1 assignee View on GitHub

@RakhithaRR is already working on this.

Since Mar 11, 2026.

Dominant language
Go
Stars
71
Forks
111
Avg merge
1d 14h
Merged PRs (30d)
110

Description

Summary

MCPProxyRepo.List and MCPProxyRepo.Count in platform-api/src/internal/repository/mcp.go only scope by organization UUID. The projectId filter is currently applied after pagination in the handler, which causes MCP proxies to be dropped from later pages and renders the count/pagination incorrect.

Problem

  • List query uses WHERE a.organization_uuid = ? only — no project_uuid predicate.
  • Count query similarly omits project_uuid from its WHERE clause.
  • As a result, filtering by project happens post-pagination, causing incorrect counts and incomplete pages.

Expected Fix

  • Thread an optional projectUUID *string parameter into both MCPProxyRepo.List and MCPProxyRepo.Count.
  • Add AND p.project_uuid = ? to both SQL queries when projectUUID is non-nil, before ORDER BY / LIMIT / OFFSET.
  • Update parameter binding order in r.db.Query / r.db.QueryRow accordingly.
  • Update the MCPProxyRepository interface in platform-api/src/internal/repository/interfaces.go to reflect the new signatures.
  • Update callers (handler and service layers) to pass the project filter down to the repository.

References

/cc @RakhithaRR

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.