Open mostafao-spotify opened 3 months ago
I am also facing similar issue where Router v1.45.1 gives below error for a query but same query return expected result on v1.40.1. There is no change in the router config/ backend infra while testing on the above 2 versions. Is there are config change in v1.45.1 that is needed in subgraph to get the data from subgraph
errors": [ { "message": "HTTP fetch failed from 'subgraphA': 415: Unsupported Media Type", "extensions": { "code": "SUBREQUEST_HTTP_ERROR", "service": "subgraphA'", "reason": "415: Unsupported Media Type", "http": { "status": 415 } } }, { "message": "HTTP fetch failed from 'subgraphA'': subgraph didn't return JSON (expected content-type: application/json or content-type: application/graphql-response+json)", "extensions": { "code": "SUBREQUEST_HTTP_ERROR", "service": "subgraphA'", "reason": "subgraph didn't return JSON (expected content-type: application/json or content-type: application/graphql-response+json)", "http": { "status": 415 } } }
It starts breaking post >v1.40.1. The request doesn't appear to reach the subgraph aws api gateway endpoint as we are not seeing the request logs in the cloudwatch
@o0Ignition0o
Describe the Bug
We are self-hosting the Router image on a Kubernetes cluster. Whenever a federated service returns a 4xx or 5xx status, the Router expects a payload in the response. If there is no payload, the Router does not recognize the
content-type
header in the response and returns the error:subgraph response does not contain 'content-type' header
, even though the federated service response does include that header.To Reproduce
Steps to reproduce the behavior:
HTTP fetch failed from 'some-federated-service': subgraph response does not contain 'content-type' header; expected content-type: application/json or content-type: application/graphql-response+json
.Expected Behavior
This error should not occur, as the
content-type
header is already present in the response.Output
Router version: