简体   繁体   中英

Apollo Federation - Subgraph healfth check in gateway

I'm implementing it as a POC in my company, Apollo Federation. And I'm not finding in the documentation how to do the health check of the subgraph so that there is no error when uploading the gateway. Is there any way to do it?

my example: https://user-images.githubusercontent.com/47068314/188695650-4181bbab-7cb1-4ee9-b81a-f555231f3701.png

We actually implemented a health check resolver in each of our subgraphs, where if the subgraph name is Orders the health check is a query named ordersHealthCheck.

There are a few nice things about this - one is that it uses Federation fully and two is that it's extendable. We've abstracted everything into a packaged class that can be extended to check for third party API connectivity and other things as part of the check.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM