Class WebGraphQlRequest
java.lang.Object
org.springframework.graphql.support.DefaultGraphQlRequest
org.springframework.graphql.support.DefaultExecutionGraphQlRequest
org.springframework.graphql.server.WebGraphQlRequest
- All Implemented Interfaces:
ExecutionGraphQlRequest
,GraphQlRequest
- Direct Known Subclasses:
WebSocketGraphQlRequest
public class WebGraphQlRequest
extends DefaultExecutionGraphQlRequest
implements ExecutionGraphQlRequest
GraphQlRequest
implementation for server
handling over HTTP or WebSocket. Provides access to the URL and headers of
the underlying request. For WebSocket, these are the URL and headers of the
HTTP handshake request.- Since:
- 1.0.0
- Author:
- Rossen Stoyanchev
-
Constructor Summary
ConstructorsConstructorDescriptionWebGraphQlRequest
(URI uri, HttpHeaders headers, Map<String, Object> body, String id, Locale locale) Create an instance. -
Method Summary
Modifier and TypeMethodDescriptionReturn the HTTP headers of the request or WebSocket handshake.getUri()
Return the URL for the HTTP request or WebSocket handshake.Methods inherited from class org.springframework.graphql.support.DefaultExecutionGraphQlRequest
configureExecutionInput, executionId, getExecutionId, getId, getLocale, toExecutionInput, toString
Methods inherited from class org.springframework.graphql.support.DefaultGraphQlRequest
equals, getDocument, getExtensions, getOperationName, getVariables, hashCode, toMap
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.springframework.graphql.ExecutionGraphQlRequest
configureExecutionInput, executionId, getExecutionId, getId, getLocale, toExecutionInput
Methods inherited from interface org.springframework.graphql.GraphQlRequest
getDocument, getExtensions, getOperationName, getVariables, toMap
-
Constructor Details
-
WebGraphQlRequest
public WebGraphQlRequest(URI uri, HttpHeaders headers, Map<String, Object> body, String id, @Nullable Locale locale) Create an instance.- Parameters:
uri
- the URL for the HTTP request or WebSocket handshakeheaders
- the HTTP request headersbody
- the deserialized content of the GraphQL requestid
- an identifier for the GraphQL requestlocale
- the locale from the HTTP request, if any
-
-
Method Details
-
getUri
Return the URL for the HTTP request or WebSocket handshake. -
getHeaders
Return the HTTP headers of the request or WebSocket handshake.
-