Skip to content
项目

eh3rrera/graphql-java-spring-boot-example

在 GitHub 查看

关于

Sample GraphQL server implemented with graphql-java and Spring Boot

网站与应用开发

这些数字如何统计

实测星标增长

24小时
0
7天
+1
15天
+1
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

graphql-java-spring-boot-example

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

Updated by @Ansonator to recent versions of Spring Boot and GraphQL Java.

The tutorial branch contains the original demo app.

You'll need Java 11 or 17.

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

To access the database, 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:

Or go 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
  }
}

Extras

This build demos some UIs hosted at graphql-java-kickstart.

License

MIT

探索相关项目

加载中…