StevenACoffman commented :
@mac2000 gqlgen (which dgraph uses) supports Apollo federation (i.e. being federated ) out of the box as described here. However, graphql-go (which dgraph also uses) does not support being federated, see graphql-go/graphql#492 so it’s not clear whether DGraph already has this capability or not.
Have you tested whether _service and _entity already work?
Clarification for others, Apollo Federation is made up of two parts:
- Federated services, which are standalone parts of the graph (DGraph could support being federated)
- A gateway which composes the overall schema and executes federated queries (out of scope for DGraph)
To be part of a federated graph, a microservice implements the Apollo Federation spec which exposes its capabilities to tooling and the gateway. The federated service can extend types from other services and add its own types that can be extended.
Collectively, federated services form a composed graph. This composition is done by a gateway which knows how to take an incoming operation and turn it into a plan of fetches to downstream services. The gateway orchestrates requests, merges the data and errors together, and forms the overall result to send back to the client.