Skip to content

A prototype that uses graphql for aggregating three different RESTful endpoints

License

Notifications You must be signed in to change notification settings

leftxmas/graphql-rest-api-aggregation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aggregate RESTful endpoints with GraphQL

This is a prototype based on a blog post published by Raymond Lee at https://raymondhlee.wordpress.com/author/raymondhlee/. This prototype is free to use but I reserve the copyright as Raymond doesn't provide full source codes and it did take me quite a bit of time to get the application working.

Tech stack

  • Spring Boot
  • GraphQL
  • Java

To run the application

Make sure you have jdk and maven installed before running this application. You can install both easily with sdkman.

To run the application, please rune the command below:

mvn clean spring-boot:run

After launching the app, go to http://localhost:8080/graphiql. Run a sample query like below:

{
  findProduct(sku: "12345") {
    sku
    stock {
      location
      qtyAvailable
    }
    salesOrders {
      qty
      totalAmount
    }
  }
}

About

A prototype that uses graphql for aggregating three different RESTful endpoints

Topics

Resources

License

Stars

Watchers

Forks

Languages