Need help with graphql-java-spring-boot-example?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

eh3rrera
159 Stars 118 Forks MIT License 7 Commits 7 Opened issues

Description

Sample GraphQL server implemented with graphql-java and Spring Boot

Services available

!
?

Need anything else?

Contributors list

# 329,331
GraphQL
Spring ...
Java
1 commit
# 329,453
GraphQL
Spring ...
Java
1 commit
# 103,822
Swift
arkit
iOS
GraphQL
1 commit
# 325,748
C#
GraphQL
Spring ...
1 commit

graphql-java-spring-boot-example

Sample app for my tutorial Building a GraphQL Server with Spring Boot.

You'll need Java 9.

Clone this repo and execute

mvnw spring-boot:run
. Or inside an IDE, execute the class
com.example.DemoGraphQL.DemoGraphQlApplication
.

You can go to http://localhost:8080/h2-console/login.jsp and enter the following information: - JDBC URL: jdbc:h2:mem:testdb - User Name: sa - Password:

To check the database or to http://localhost:8080/graphiql to start executing queries. For example:

{
  findAllBooks {
    id
    isbn
    title
    pageCount
    author {
      firstName
      lastName
    }
  }
}

Or:

mutation {
  newBook(
    title: "Java: The Complete Reference, Tenth Edition", 
    isbn: "1259589331", 
    author: 1) {
      id title
  }
}

License

MIT

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.