Skip to content

Commit 1750187

Browse files
committed
Move from readme to documentation
1 parent cb5c2da commit 1750187

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

README.md

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -17,38 +17,9 @@ This project requires at least Java 8.
1717

1818
See [Getting started](https://www.graphql-java-kickstart.com/servlet/getting-started/) for more detailed instructions.
1919

20-
# Usage
21-
22-
The servlet supports the following request formats:
23-
* GET request to `../schema.json`: Get the result of an introspection query.
24-
* GET request with query parameters (query only, no mutation):
25-
* query
26-
* operationName (optional)
27-
* variables (optional)
28-
* POST body JSON object with fields:
29-
* query
30-
* operationName (optional)
31-
* variables (optional)
32-
* POST multipart part named "graphql" containing JSON object with fields:
33-
* query
34-
* operationName (optional)
35-
* variables (optional)
36-
* POST multipart parts named "query", "operationName" (optional), and "variables" (optional)
37-
* POST with Content Type "application/graphql" will treat the HTTP POST body contents as the GraphQL query string
38-
3920
## Relay.js support
4021

4122
Relay.js support is provided by the [EnhancedExecutionStrategy](https://github.com/graphql-java/graphql-java-annotations/blob/master/src/main/java/graphql/annotations/EnhancedExecutionStrategy.java) of [graphql-java-annotations](https://github.com/graphql-java/graphql-java-annotations).
4223
You **MUST** pass this execution strategy to the servlet for Relay.js support.
4324

4425
This is the default execution strategy for the `OsgiGraphQLHttpServlet`, and must be added as a dependency when using that servlet.
45-
46-
## Spring Framework support
47-
48-
To use the servlet with Spring Framework, either use the [Spring Boot starter](https://github.com/graphql-java/graphql-spring-boot) or simply define a `ServletRegistrationBean` in a web app:
49-
```java
50-
@Bean
51-
ServletRegistrationBean graphQLServletRegistrationBean(GraphQLSchema schema, ExecutionStrategy executionStrategy, List<GraphQLOperationListener> operationListeners) {
52-
return new ServletRegistrationBean(new SimpleGraphQLServlet(schema, executionStrategy, operationListeners), "/graphql");
53-
}
54-
```

0 commit comments

Comments
 (0)