Spring GraphQL examples using the following frameworks and libraries:
TBD
Example name | Lang/Build tools | Description |
---|---|---|
dgs | Java/Maven | Simple Netflix DGS example |
dgs-webflux | Java/Maven | Simple Netflix DGS example with Spring WebFlux |
dgs-subscription-ws | Kotlin/Gradle | Simple Netflix DGS Subscription example using WebSocket protocol |
dgs-subscription-ui | TypeScript/Angular CLI | Angular Client app for dgs-subscription-ws |
dgs-subscription-sse | Kotlin/Gradle | Simple Netflix DGS Subscription example using Http/SSE protocol |
dgs-codegen | Java/Gradle | Netflix DGS example with Spring Jdbc and Gradle codegen plugin |
dgs-fileupload | Java/Gradle | Netflix DGS file upload example |
dgs-client | Java/Gradle | Netflix DGS Typesafe Client example |
dgs-kotlin | Kotlin/Gradle | Netflix DGS example written in Kotlin, Spring Data Jdbc, Spring Security and Spring Session/Spring Data Redis |
graphql-java-vanilla | Java/Gradle | GraphQL Java vanilla Spring Boot example |
graphql-java | Java/Gradle | GraphQL Java Kickstart Spring Boot example |
graphql-java-webclient | Java/Gradle | GraphQL Java Kickstart Spring WebClient example |
graphql-java-annotations | Java/Gradle | GraphQL Java Kickstart Spring Boot example(Code first) |
spring-graphql | Java/Gradle | Spring GraphQL example |
spring-graphql-annotations | Java/Gradle | Spring GraphQL with annotated DataFecthers example |
Make sure you have installed the following software.
- Java 16
- Apache Maven 3.8.x / Gradle 7.x
- Docker
Some sample codes are written in Kotlin. If you are new to Kotlin, start to learn it from the the Kotlin homepage.
Clone the source codes from Github.
git clone https://github.com/hantsy/spring-graphql-sample/
Open a terminal, and switch to the root folder of the project, and run the following command to build the whole project.
docker-compose up postgres // start up a postgres it is required
cd examplename // change to the example folder
mvn clean install // build the project
//or
./gradlew build
Run the application.
mvn spring-boot:run
//or
./gradlew bootRun
// or from command line after building
java -jar target/xxx.jar
Any suggestions are welcome, filing an issue or submitting a PR is also highly recommended.
- Getting started with GraphQL Java and Spring Boot
- Getting Started with GraphQL and Spring Boot
- Open Sourcing the Netflix Domain Graph Service Framework: GraphQL for Spring Boot
- Netflix Open Sources Their Domain Graph Service Framework: GraphQL for Spring Boot
- Netflix Embraces GraphQL Microservices for Rapid Application Development
- GraphQL Reference Guide: Building Flexible and Understandable APIs