You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to migrate REST microservices to using DGS and have been having trouble routing with an API gateway. I guess based on this answer, it seems like this isn't doable, but I figured I'd double check.
Using actuator I'm able to see that the services each have /graphql as an endpoint. I'm using Spring Cloud Gateway so I have a config file that looks like this:
@Bean
open fun routes(builder: RouteLocatorBuilder): RouteLocator{
return builder.routes()
.route("user-service"){ it.path("/v1/users/**", "/v1/userinfo/**")
.uri("http://localhost:3000")
}
.route("user-graphql"){ it.path("/userService/graphql")
.uri("http://localhost:3000/graphql")
}
.build()
}
Again, checking on those routes I can see that http://localhost:8080/userService/graphql is pointing to http://localhost:3000/graphql but I'm getting a 404 error in response to trying to query the API gateway endpoint. Is this a "roll your own" scenario or just something that isn't doable with DGS currently?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to migrate REST microservices to using DGS and have been having trouble routing with an API gateway. I guess based on this answer, it seems like this isn't doable, but I figured I'd double check.
Using actuator I'm able to see that the services each have
/graphqlas an endpoint. I'm using Spring Cloud Gateway so I have a config file that looks like this:Again, checking on those routes I can see that
http://localhost:8080/userService/graphqlis pointing tohttp://localhost:3000/graphqlbut I'm getting a404error in response to trying to query the API gateway endpoint. Is this a "roll your own" scenario or just something that isn't doable with DGS currently?Beta Was this translation helpful? Give feedback.
All reactions