[Bug]: GraphQL deployment metadata (vhostMain, endpointUrl) is accepted and returned but has no effect
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- go, graphql, openapi
- Domain
- api, backend-api-design
Research direction
Start with the GraphQL deployment path and the REST deployment path for comparison, then read platform-api/resources/openapi.yaml for the metadata contract. Trace how deployment metadata is translated into the stored artifact and gateway configuration, focusing on vhostMain and endpointUrl. Done means these settings either affect GraphQL routing as expected or the deployment request rejects them with 400; add or run the relevant deployment and routing tests.
Written by the indexing model from the issue text.
Description
Please select the area the issue is related to
Platform API
Please select the aspect the issue is related to
Aspect/API (API backends, definitions, contracts, interfaces, OpenAPI)
Description
A GraphQL API deployment accepts the vhostMain and endpointUrl metadata keys, stores them, and returns them on the deployment. Neither has any effect:
vhostMain: the stored artifact has novhosts, and the API answers on anyHost. A request withHost: unrelated.examplereturned200.endpointUrl: the backend still received requests at the API's own upstream path (/graphql), not at the configured/override.
The DeployRequest.metadata description in platform-api/resources/openapi.yaml lists these keys as supported "for REST APIs". A REST API deployed with the same metadata applies both: the API is served only on the configured vhost, at the overridden endpoint. So for GraphQL the keys are unsupported but silently accepted, and the response suggests they took effect.
Expected: the keys take effect for GraphQL APIs, or the deployment request rejects them with 400.
Actual: they are stored and returned as if applied, but ignored.
Steps to Reproduce
- Create a GraphQL API (multipart
POST /api/v0.9/graphql-apis,metadatapart):
{"id":"b12-gql","displayName":"b12-gql","context":"/b12","version":"v1","projectId":"default","schemaSource":"inline","sdl":"type Query { hello: String }","upstream":{"main":{"url":"<echo-backend>/graphql"}}}. - Deploy it with metadata:
POST /api/v0.9/graphql-apis/b12-gql/deploymentswith{"name":"d1","base":"current","gatewayId":"<gateway-id>","metadata":{"vhostMain":"gql.example.com","endpointUrl":"<echo-backend>/override"}}. It becomesDEPLOYED, andGET .../deployments/<deploymentId>returns thatmetadata. - Read the stored artifact (
SELECT content FROM deployments WHERE uuid='<deploymentId>'). It has novhosts, andupstream.main.urlis<echo-backend>/graphql. - Call
POST <router>/b12withHost: unrelated.example. It returns200. - Call
POST <router>/b12withHost: localhost. It returns200, and the echo backend shows path/graphql. - For comparison, deploy a REST API with
{"vhostMain":"rest.example.com","endpointUrl":"<echo-backend>/override"}.Host: localhostreturns404, andHost: rest.example.comreaches/override/....
Severity Level of the Issue
Severity/Minor (Non-critical functionality. Can be fixed in future releases)
Environment Details (with versions)
- Source:
mainatf5c93849. - platform-api built from source (SQLite).
- Gateway images (
gateway-controller/gateway-runtime2026.09.24) built from that commit. - Echo backend:
ghcr.io/wso2/api-platform/sample-service:latest. - macOS with Rancher Desktop.
- Dominant language
- Go
- Stars
- 85
- Forks
- 137
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 247
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from wso2/api-platform
-
Area/DeveloperPortal Aspect/UI Severity/Minor Type/Bug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
wso2/api-platform#4369 ·
Maintainers usually reply within 1 day
-
[Bug]: host-rewrite policy documentation lists fewer allowed host characters than the policy acceptsOpenArea/Policies Aspect/Other Severity/Trivial Type/Bug
Difficulty 1/5 Under an hour Newbie friendliness 91/100
wso2/api-platform#4355 ·
Maintainers usually reply within 1 day
-
Area/Gateway Aspect/API Severity/Minor Type/Bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
wso2/api-platform#4348 ·
Maintainers usually reply within 1 day
-
Aspect/AI Aspect/API. Severity/Major
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
wso2/api-platform#4343 ·
Maintainers usually reply within 1 day
-
Area/Policies Aspect/Configuration Severity/Minor Type/Bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
wso2/api-platform#4330 ·
Maintainers usually reply within 1 day
All issues in wso2/api-platform
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Inconsistency between golang and cue in specPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
security
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Tencent/LoopForge#1087 · 1 comment ·
Maintainers usually reply within 1 day