examples
examples copied to clipboard
Calling REST multiple services
I have a microservice architecture with several REST services and dedicated databases for each service. I want to create a report that consist of data from multiple services. Can this lib be used for this case. Scenario Car service list all cars and order history list all orders for each car. Report shown below should list all recent 10 order against all the cars in the cars db.
Question:
- In the scheme how do I resolve orders? is it best to call the orders rest endpoint directly or use the database repository as the source.
- can this approach handle 10,000 cars and history?
- Is there an example of similar implementation I can use?
The short answer ia YES.
- You can call any code in your resolvers, including, of course, the code that makes the calls to some databases.
- Why not? It depends of your needs and database performance.
- In this repository - NO, but you can ask on StackOverflow or search in Google since your questions are very general.