https://github.com/lakshay2395/graphql-federation
Complete end-to-end example of graphql federation using netflix DGS framework
https://github.com/lakshay2395/graphql-federation
apollo-gateway dgs-framework federation java springboot
Last synced: 2 months ago
JSON representation
Complete end-to-end example of graphql federation using netflix DGS framework
- Host: GitHub
- URL: https://github.com/lakshay2395/graphql-federation
- Owner: lakshay2395
- Created: 2021-11-09T12:02:16.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-09T12:25:51.000Z (over 3 years ago)
- Last Synced: 2024-12-26T00:24:25.676Z (7 months ago)
- Topics: apollo-gateway, dgs-framework, federation, java, springboot
- Language: Java
- Homepage:
- Size: 72.3 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# graphql-federation
Complete end-to-end example of graphql federation using netflix DGS frameworkIt consists of three components -
- Product Inventory Service
- Customer Service
- Order Service## System Overview
## 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
}
}
```