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
ConstructorDescriptionWebGraphQlRequest
(URI uri, HttpHeaders headers, Map<String, Object> body, String id, Locale locale) Deprecated.as of 1.1.3 in favor of the constructor with cookiesWebGraphQlRequest
(URI uri, HttpHeaders headers, MultiValueMap<String, HttpCookie> cookies, Map<String, Object> attributes, Map<String, Object> body, String id, Locale locale) Create an instance. -
Method Summary
Modifier and TypeMethodDescriptionReturn the request or WebSocket session attributes.Return the cookies of the request of WebSocket handshake.Return 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
@Deprecated public WebGraphQlRequest(URI uri, HttpHeaders headers, Map<String, Object> body, String id, @Nullable Locale locale) Deprecated.as of 1.1.3 in favor of the constructor with cookiesCreate an instance. -
WebGraphQlRequest
public WebGraphQlRequest(URI uri, HttpHeaders headers, @Nullable MultiValueMap<String, HttpCookie> cookies, Map<String, Object> attributes, 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 headerscookies
- the HTTP request cookiesattributes
- request attributesbody
- the deserialized content of the GraphQL requestid
- an identifier for the GraphQL requestlocale
- the locale from the HTTP request, if any- Since:
- 1.1.3
-
-
Method Details
-
getUri
Return the URL for the HTTP request or WebSocket handshake. -
getHeaders
Return the HTTP headers of the request or WebSocket handshake. -
getCookies
Return the cookies of the request of WebSocket handshake.- Since:
- 1.1.3
-
getAttributes
Return the request or WebSocket session attributes.- Since:
- 1.1.3
-