Demo application of using DGS framework together with Apollo Federation Server.
The repository contains three dgs microservices:
game-dgs: Spring Boot GraphQL service providing the federatedGametype.user-dgs: Spring Boot GraphQL service providing the federatedUsertype.review-dgs: Spring Boot GraphQL service extendingGameandUsertype withReview.
And a apollo-gateway acting as the Federated Gateway connecting the three microservices.
The image below summarize the relation between them:

- Start
game-dgsby running the Spring Boot app from an IDE ormvn spring-boot:run. - Start
user-dgsby running the Spring Boot app from an IDE ormvn spring-boot:run. - Start
review-dgsby running the Spring Boot app from an IDE ormvn spring-boot:run. - Run
npm installinapollo-gatewayand thennpm run server. - Open http://localhost:4000 in the GraphQL Playground.
The following federated queries should work when all microservices are up:
{
games {
name
releaseYear
reviews {
comment
starRating
}
}
}{
users {
username
reviews {
comment
starRating
}
}
}{
reviews {
comment
starRating
game {
name
}
user {
username
}
}
}Made by Lucas Reis