[Bug]: GraphQL deployment metadata (vhostMain, endpointUrl) is accepted and returned but has no effect
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- go, graphql, openapi
- Ambito
- api, backend-api-design
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Go
- Stelle
- 85
- Fork
- 137
- Merge medio
- 1g 12h
- PR unite (30g)
- 247
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di wso2/api-platform
-
Area/DeveloperPortal Aspect/UI Severity/Minor Type/Bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
wso2/api-platform#4369 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: host-rewrite policy documentation lists fewer allowed host characters than the policy acceptsApertaArea/Policies Aspect/Other Severity/Trivial Type/Bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 91/100
wso2/api-platform#4355 ·
I maintainer di solito rispondono entro 1 giorno
-
Area/Gateway Aspect/API Severity/Minor Type/Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
wso2/api-platform#4348 ·
I maintainer di solito rispondono entro 1 giorno
-
Aspect/AI Aspect/API. Severity/Major
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
wso2/api-platform#4343 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: content-length-guardrail policy accepts a non-string streamingJsonPath at API creationApertaArea/Policies Aspect/Configuration Severity/Minor Type/Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
wso2/api-platform#4330 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di wso2/api-platform
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
mozilla-ai/cq#601 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno