...
Further we are going to explain the foundational patterns and principles for building Marionette microservices and driving their integrations with APIs. It is important to understand that an API is just a layer on top of an application, and that there are different types of interfaces. Understanding that Marionette’s Microservices interact through APIs, let’s review how we organize these APIs using GraphQL.
What is GraphQL?
Now that swe we defined what an API is, let’s review the features that define web APIs. A web API is an API that uses the Hypertext Transfer Protocol (HTTP) protocol to transport data. Web APIs are implemented using technologies such as SOAP, REST, GraphQL, gRPC, and others. When a resource is represented by a large payload, fetching it from the server translates to a large amount of data transfer. With the emergence of API clients running in mobile devices with restricted network access, limited storage and memory capacity, exchanging large payloads often results in unreliable communication.
...
For example: Trading service owns data about trades, each side of the order and a rich list of properties that describe the extensive details of this tradeany one particular trade or group of trades. However, when the end-user requests to see a list of tradesinformation applicable to the trade(s), in their trading history for example, Marionette operator will not display these the extensive details of the trade to this the user. It is best practice to only fetch the data they will relay to Frontend UI and only display the key data interesting to this user. Further, Marionette operator will often fetch data from various trading services to relay data the end-user is requesting to see on the Front-end. GraphQL offers the the ability to traverse the relationships between trades, orders, and other objects owned by the trading service and do so with minimal server requests.
...