Federation with Java & DGS: Getting error while hitting query via router. Hitting subgraph directly working fine.
I have checked apollo studio, everything is configured correctly.
Request:
query GetFeaturedPlaylists {
featuredPlaylists {
id
name
description
}
}
Via router
{
"data": null,
"errors": [
{
"message": "HTTP fetch failed from 'soundtracks': 404: Not Found",
"extensions": {
"code": "SUBREQUEST_HTTP_ERROR",
"service": "soundtracks",
"reason": "404: Not Found",
"http": {
"status": 404
}
}
},
{
"message": "HTTP fetch failed from 'soundtracks': subgraph didn't return JSON (expected content-type: application/json or content-type: application/graphql-response+json; found content-type: text/html)",
"extensions": {
"code": "SUBREQUEST_HTTP_ERROR",
"service": "soundtracks",
"reason": "subgraph didn't return JSON (expected content-type: application/json or content-type: application/graphql-response+json; found content-type: text/html)",
"http": {
"status": 404
}
}
}
]
}
via directly subgraph:
{
"data": {
"featuredPlaylists": [
{
"id": "6Fl8d6KF0O4V5kFdbzalfW",
"name": "Sweet Beats & Eats",
"description": "Tooth-achingly sweet beats for your sweet eats"
},
{
"id": "20RU4pHDte01QywpOL6ifh",
"name": "Grilling Tunes",
"description": "Set the barbecue mood. Upbeat and laid-back tracks complement the sizzle of the grill, turning your outdoor cooking sessions into a flavorful experience. For those who savor good music and great food, it's the perfect playlist"
},
{
"id": "6LB6g7S5nc1uVVfj00Kh6Z",
"name": "Zesty Culinary Harmony",
"description": "Infuse flavor into your kitchen. This playlist merges zesty tunes with culinary vibes, creating a harmonious background for your cooking escapades. Feel the synergy between music and the zest of your creations."
}
]
}
}