0

I have the below spring boot graphql microservices in java

  • /graphql1 - with User service
  • /graphql2 - with Product service

All these 2 microservice run on different ports.

I would like to host these 2 microservices through one single graphql api gateway i.e. /graphql .
Like when the, query is userlist - api should redirect the request to /graphql1 - User service

I have read about apollo gateway. Use of apollo gateway in this scenario is a good option?
or how to create graphql api gateway to fullfill this scenario.
Any reference and guidance is appreciated.

Khyati
  • 13
  • 4
  • You're looking for [federation](https://www.apollographql.com/docs/federation/) – Michel Floyd Jul 20 '23 at 15:20
  • @MichelFloyd Want to know using apollo gateway is good option to fulfill this mentioned scenario. As apollo gateway is in Node.js and my microservices are in spring boot graphql ? Or could suggest me better option? – Khyati Jul 21 '23 at 06:12
  • IMO it's the best option out there. You will have a small node server that routes traffic to your spring boot microservices. I'm not aware of any java based federation server. – Michel Floyd Jul 21 '23 at 15:41

0 Answers0