microservicesapolloapollo-serverapollo-federationapollo-gateway

How to have timing and retry policy when Apollo gateway is failing?


The Apollo Gateway module requires a list of GraphQL servers to connect to. If any of these services miss responding with a success code to the Apollo Gateway, the whole Gateway will exit with a failed status.

There should be a retry policy for when the gateway is failing. Apollo Gateway initialization so that it is managed by a retry function in case of failure.

How can I do that?


Solution

  • I could find the solution:

    With gateway.load() we could catch the errors and do whatever we want.