Class GraphQlHttpHandler.Builder
java.lang.Object
org.springframework.graphql.server.webmvc.GraphQlHttpHandler.Builder
- Enclosing class:
GraphQlHttpHandler
Builder for
GraphQlHttpHandler.- Since:
- 2.1.0
- Author:
- Rossen Stoyanchev, Brian Clozel
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build theGraphQlHttpHandler.httpMethods(HttpMethod... httpMethods) Set the HTTP methods that the handler should support.messageConverter(HttpMessageConverter<?> converter) Set the converter to use to read and write GraphQL payloads.
-
Method Details
-
messageConverter
Set the converter to use to read and write GraphQL payloads.If not set, the handler will use the one configured for web use.
- Parameters:
converter- the converter to use
-
httpMethods
Set the HTTP methods that the handler should support.By default, only
HttpMethod.POSTis supported. EnablingHttpMethod.GETmeans that queries and their parameters are exposed through the request URL; consider the security implications, for example URLs being logged or cached, before enabling it.- Parameters:
httpMethods- the HTTP methods to support
-
build
Build theGraphQlHttpHandler.
-