Spring Boot starter examples (spring-graphql-examples)
Spring Boot application examples with GraphQL in three approaches:
- Schema-first style - pure GraphQL Java (graphql-java)
- Schema-first style with tool - GraphQL Java Tools (graphql-java-tools)
- Code-first style - GraphQL SPQR (graphql-spqr)
GraphQL Java Spring example without Spring Boot starter (graphql-java-spring-example)
- Pure Spring Boot with GraphQL endpoint made by hand.
Schema-first style (pure GraphQL Java) based on:
- GraphQL Java implementation: https://github.com/graphql-java/graphql-java
Endpoint: http://localhost:7010/graphql
GraphQL Java Spring (graphql-java-spring-example)
- Starter: https://github.com/graphql-java/graphql-java-spring
- Tutorial: https://www.graphql-java.com/tutorials/getting-started-with-spring-boot/
- Official example: https://github.com/graphql-java/tutorials
Schema-first style (pure GraphQL Java) based on:
- GraphQL Java implementation: https://github.com/graphql-java/graphql-java
Endpoint: http://localhost:7001/graphql
GraphQL with Graph QL Java Tools (graphql-java-tool-spring-example)
- Starter: https://github.com/graphql-java-kickstart/graphql-spring-boot
- Tutorial:
- Official example: https://github.com/graphql-java-kickstart/graphql-spring-boot/tree/master/example
Schema-first style with tool based on:
-
GraphQL Java Tools: https://github.com/graphql-java-kickstart/graphql-java-tools
-
Endpoint:
http://localhost:7002/graphql
GraphQL with GraphQL SPQR (graphql-spqr-spring-example)
- Starter: https://github.com/leangen/graphql-spqr-spring-boot-starter
- Official example:
Code-first style based on:
- GraphQL SPQR: https://github.com/leangen/graphql-spqr
Endpoint: http://localhost:7003/graphql
GraphQL wrapping REST with GraphQL SPQR (graphql-wrap-rest)
- Based on starter from "Spring Boot starter: GraphQL with GraphQL SPQR"
Endpoint: http://localhost:7300/graphql
Playground: http://localhost:7300/gui
To run queries from scratch files (scratch.graphql
) with IntelliJ use JS GraphQL plugin (version 2,
currently beta).