This project demonstrates how to set up a basic GraphQL server using Spring Boot. The server will be available on http://localhost:8080/graphiql
.
- Java 17 or later
- Maven 3.6.0 or later
Create a new Spring Boot project using Spring Initializr (https://start.spring.io/) with the following dependencies:
- Spring Web
- GraphQL
Create a schema.graphqls
file in src/main/resources/graphql
:
type Query {
hello: String
}