Skip to content

Latest commit

 

History

History
81 lines (75 loc) · 1.43 KB

README.md

File metadata and controls

81 lines (75 loc) · 1.43 KB

graphql-federation

Complete end-to-end example of graphql federation using netflix DGS framework

It consists of three components -

  • Product Inventory Service
  • Customer Service
  • Order Service

System Overview

Complete System Flow

Start the services

  • Start the service(s)
mvn spring-boot:run
  • Start the federated gateway
nodemon start

Major Queries

  • Add Product(s)
mutation AddProduct($productInput0: ProductInput, $productInput1: ProductInput, $productInput2: ProductInput) {
    add0: addProduct(product: $productInput0) {
        id
        name
        type
        cost
    }
    add1: addProduct(product: $productInput1) {
        id
        name
        type
        cost
    }
    add2: addProduct(product: $productInput2) {
        id
        name
        type
        cost
    }
}
  • Add Customer
mutation AddCustomer($customer: CustomerInput){
    addCustomer(customer: $customer){
        id
        firstName
        lastName
        emailId
        profilePicURL
    }
}
  • Add Order
mutation AddOrder($order: OrderInput){
    addOrder(order: $order){
        customer {
            emailId
            firstName
            id
            lastName
            profilePicURL
        }
        id
        products {
            cost
            id
            name
            type
        }
        status
    }
}