Really like the GraphQL Federation concept, where a gateway joins the data for clients. For example, imagine a library:
- Service A serves books from the library with title & ISBN property.
- Service B serves people, with a checkedOut list of books they have checked out, by ISBN.
From what I can tell, though, there is no way to have two services serve data from the same schema. In this case, imagine a second library is created that is serving its own books:
- Service C serves books from library 2 with title & ISBN property (i.e., same schema as service A).
I imagine a gateway that allows me to:
- Query for books and get results from either service A or service C.
books {
title
}
- Allow people to checkout books from either library, and queries would return results from all three services (starting with service B, joining to either service A or B as appropriate):
person {
checkedOut {
title
}
}
Is this possible? If so, can someone point me to example documentation describing how to do it?
If not, what am I missing? Doesn’t this seem like a logical use case for Federation?