Skip to content

Spring Boot GraphQL microservices demo that shows how to use DGS framework together with Apollo Federation Server.All applications can be run locally, inside docker or kubernetes cluster.

License

Notifications You must be signed in to change notification settings

rbiedrawa/spring-graphql-federation-microservices-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Boot GraphQL Federation Microservices (PoC)

Spring Boot GraphQL microservices demo that shows how to use DGS framework together with Apollo Federation Server.

All applications can be run locally, inside docker or kubernetes cluster.

Table of Content

Services

  • Apollo Gateway - Apollo Server acting as the Federated Gateway.
  • Customer Service - Spring Boot GraphQL application providing the federated Customer type.
  • Review Service - Spring Boot GraphQL application that extends the Customer type with reviews.

Architecture

k8s-dashboard

Getting Started

Installation

Please refer to the individual readme files on instructions of how to run the services.

Usage

  • Start services.

  • Open GraphQL playground GUI.

  • Write the following query and tests the result:

    • Find all customers with reviews (federated query)
    query {
      customers{
        id
        firstName
        reviews{
          id
          rating
          message
        }
      }
    }
    

    e.g Federation Query Response

    • Create new customer
      mutation {
        addCustomer(customer: { firstName: "New User" }) {
          id
          firstName
        }
      }
      

Deployment

Build

You can build all the services by running the buildDockerImages.sh on Mac/Linux systems.

Docker

Docker compose file with instructions are kept in docker subdirectory.

Kubernetes

Kubernetes manifests with instructions are kept in k8s subdirectory.

References

License

Distributed under the MIT License. See LICENSE for more information.

About

Spring Boot GraphQL microservices demo that shows how to use DGS framework together with Apollo Federation Server.All applications can be run locally, inside docker or kubernetes cluster.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published