Connecting individual microservices exposed via graphQL to an application gateway aggregation layer

11/18/2019

Taking into consideration the microservices architecture, let's say that we have two microservices which are exposing graphQL at

localhost:4000/graphql
localhost:4001/graphql

Now I need to write one application gateway layer in nodeJS , say exposed at

 https://hostname/api

via kubernetes ingress rule.

Now please help in following contexts -


  1. How can I call services S1 and S2 mentioned above, via this application gateway

    a. If they are dependent on each other

    b. if they are independent of each other


  1. What graphql components of S1 and S2 should be kept in application gateway ( like aggregated Schema Definition file and how to call resolvers of the S1 and S2 from this)
-- Tushar Mahajan
apollo-server
express-graphql
kubernetes
microservices
node.js

0 Answers