- Spring-boot GraphQL integration
- GraphQL Queries to make CRUD operations
- Sorting, Filtering, and Pagination features in data query
- H2-Database integration and initialization of data on start-up
- Input Validations
- Entity relations
- Logging
- Import the project in an IDE and run
mvn clean compilein the terminal to compile - Run the *Application class that contains the main method
- Access URL http://localhost:8080/graphiql?path=/graphql in the browser and execute query
- To create glue between Entity and GraphQL schema we use annotation @Controller
- GraphQLExceptionHandler handles exceptions to make sure that user gets proper http 400 response code
- spring.jpa.hibernate.ddl-auto=create-drop is added to auto generate schema
- spring.graphql.graphiql.enabled is used to enable graphql
- The schema file contains the query and Entity
- Use GraphQL plugin in Intellij for plugin support