graphql-java-kickstart-federation-example
                                
                                 graphql-java-kickstart-federation-example copied to clipboard
                                
                                    graphql-java-kickstart-federation-example copied to clipboard
                            
                            
                            
                        A GraphQL Java Kickstart federation example, ported from netflix/dgs-federation-example.
A GraphQL Java Kickstart / GraphQL Spring Boot federation example, ported from netflix/dgs-federation-example.
The repository contains three separate projects:
- shows: A Java GraphQL service providing the federated- Showtype
- reviews: A Java GraphQL service that extends the- Showtype with- reviews
- apollo-gateway: An instance of Apollo Server acting as the Federated Gateway
The shows and reviews projects are Maven projects.
The apollo-gateway is a Node project.
Running the demo
- Start showby running the Spring Boot app from the IDE
- Start reviewsby running the Spring Boot app from the IDE
- Run npm installin theapollo-gatewayproject
- Run node index.jsin theapollo-gatewayproject
- Open http://localhost:4000 for the query editor
The following is a federated query that should work.
{
  shows {
    title
    reviews {
      starRating
    }
  }
}