Skip to content

deepak1410/spring-boot-graphql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What this project covers

  • 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

How to run

  • Import the project in an IDE and run mvn clean compile in 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

Notes

  • 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

application.properties

  • spring.jpa.hibernate.ddl-auto=create-drop is added to auto generate schema
  • spring.graphql.graphiql.enabled is used to enable graphql

schema.graphqls changes

  • The schema file contains the query and Entity

Plugins for IDE

  • Use GraphQL plugin in Intellij for plugin support

About

A Workforce management project that covers CRUD operations using GraphQL and Spring-boot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages