I do not understand this for both redux-middleware and apollo-links. How all these functions are executed in sequence and then pass the context to each other Can someone please explain it to me?
The answer was in the Observer pattern. In this pattern, we have an entity (called a subject) that several other entities listen to without knowing how it works (called an observer). As soon as the subject changes, all observers are notified and perform a special operation based on this change. In apollo-link, by defining each link, you generate an independent observerable that listens for apollo-client operation changes.