Skip to content
This repository was archived by the owner on Oct 25, 2021. It is now read-only.

Commit bfef070

Browse files
committed
readme
1 parent 3853a00 commit bfef070

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# GraphQL Java Spring
2+
3+
4+
This project integrates GraphQL Java into Spring/Spring Boot, by enabling query execution via HTTP.
5+
6+
While the GraphQL Specification itself doesn't specify any transport protocol there is a quasi standard how to do it described
7+
[here](https://graphql.org/learn/serving-over-http/) and this project follows this quasi standard.
8+
9+
Goals / Design:
10+
11+
- Just HTTP JSON: the current focus is on HTTP execution via JSON.
12+
- Minimal Dependencies: the only dependencies are GraphQL Java and Spring projects.
13+
- No additional abstraction layer on top of GraphQL Java: GraphQL Java is meant to be used directly.
14+
15+
16+
17+
## Spring Boot Starter
18+
19+
The Spring Boot Starter artifact provides a HTTP endpoint on ${graphql.url} with the default value "/graphql" just by being on the classpath.
20+
21+
The only requirement is to have a Bean of type `graphql.GraphQL` available.
22+
23+
Add the following dependency to your `build.gradle` (make sure `mavenCentral()` is among your repos)
24+
25+
```groovy
26+
dependencies {
27+
implementation "com.graphql-java:graphql-java-spring-boot-starter:1.0"
28+
}
29+
30+
```
31+
32+
or to your `pom.xml`
33+
34+
```xml
35+
<dependency>
36+
<groupId>com.graphql-java</groupId>
37+
<artifactId>graphql-java-spring-boot-starter</artifactId>
38+
<version>1.0</version>
39+
</dependency>
40+
41+
```

0 commit comments

Comments
 (0)