This repository is a GraphQL demo of using the DGS framework together with Apollo Federation Server.
Documentation for the DGS framework can be found here.
The repository contains three separate projects:
shows-dgs
: A Kotlin GraphQL service providing the federated Show
typereviews-dgs
: A Java GraphQL service that extends the Show
type with reviews
apollo-gateway
: An instance of Apollo Server acting as the Federated GatewayThe shows-dgs
and reviews-dgs
projects are Gradle projects.
The apollo-gateway
is a Node project.
We recommend to import the three individual projects in Intellij.
show-dgs
by running the Spring Boot app from the IDE or ./gradlew bootRun
reviews-dgs
by running the Spring Boot app from the IDE or ./gradlew bootRun
npm install
in the apollo-gateway
projectnode index.js
in the apollo-gateway
projectThe following is a federated query that should work.
{
shows {
title
reviews {
starRating
}
}
}