Problem: On GHE Cloud with data residency (e.g., sj.ghe.com), the DIFC proxy (ghcr.io/github/gh-aw-mcpg:v0.3.19) correctly routes REST (/api/v3) but returns HTTP 404 for GraphQL (/api/graphql). The Copilot agent fails immediately on its first GraphQL call, blocking agent startup entirely.
Context: gh-aw#36209 — GHE Cloud data residency (sj.ghe.com), gh aw v0.76.1. Logs: [startup] Upstream GitHub API URL: (copilotapi.sj.ghe.com/redacted) ✓ then `HTTP 404: 404 Not Found ((localhost/redacted)
Root Cause: The DIFC/MCP gateway proxy does not map the /api/graphql path to the correct upstream for GHE data residency hosts. It resolves the upstream correctly for /api/v3 (REST) but lacks a route entry for /api/graphql, returning 404.
Proposed Solution:
- In the MCP gateway proxy route table, forward
/api/graphql to the same upstream host used for REST, applying the same host-resolution logic as /api/v3.
- Validate
GITHUB_GRAPHQL_URL at proxy startup and use it as the upstream target for all GraphQL requests.
- Add an integration test covering GHE data-residency
copilot-api.*.ghe.com endpoints for both REST and GraphQL paths.
Generated by Firewall Issue Dispatcher · sonnet46 4.4M · ◷
Problem: On GHE Cloud with data residency (e.g.,
sj.ghe.com), the DIFC proxy (ghcr.io/github/gh-aw-mcpg:v0.3.19) correctly routes REST (/api/v3) but returns HTTP 404 for GraphQL (/api/graphql). The Copilot agent fails immediately on its first GraphQL call, blocking agent startup entirely.Context: gh-aw#36209 — GHE Cloud data residency (
sj.ghe.com),gh awv0.76.1. Logs:[startup] Upstream GitHub API URL: (copilotapi.sj.ghe.com/redacted) ✓then `HTTP 404: 404 Not Found ((localhost/redacted)Root Cause: The DIFC/MCP gateway proxy does not map the
/api/graphqlpath to the correct upstream for GHE data residency hosts. It resolves the upstream correctly for/api/v3(REST) but lacks a route entry for/api/graphql, returning 404.Proposed Solution:
/api/graphqlto the same upstream host used for REST, applying the same host-resolution logic as/api/v3.GITHUB_GRAPHQL_URLat proxy startup and use it as the upstream target for all GraphQL requests.copilot-api.*.ghe.comendpoints for both REST and GraphQL paths.