This repository was archived by the owner on Oct 25, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 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+ ```
You can’t perform that action at this time.
0 commit comments