Class WebSocketGraphQlRequest
java.lang.Object
org.springframework.graphql.support.DefaultGraphQlRequest
org.springframework.graphql.support.DefaultExecutionGraphQlRequest
org.springframework.graphql.server.WebGraphQlRequest
org.springframework.graphql.server.WebSocketGraphQlRequest
- All Implemented Interfaces:
ExecutionGraphQlRequest
,GraphQlRequest
WebGraphQlRequest
extension for
server handling of GraphQL over WebSocket requests.- Since:
- 1.0.0
- Author:
- Rossen Stoyanchev
-
Constructor Summary
ConstructorDescriptionWebSocketGraphQlRequest
(URI uri, HttpHeaders headers, Map<String, Object> body, String id, Locale locale, WebSocketSessionInfo sessionInfo) Deprecated.as of 1.1.3 in favor of the constructor with cookiesWebSocketGraphQlRequest
(URI uri, HttpHeaders headers, MultiValueMap<String, HttpCookie> cookies, Map<String, Object> attributes, Map<String, Object> body, String id, Locale locale, WebSocketSessionInfo sessionInfo) Create an instance. -
Method Summary
Modifier and TypeMethodDescriptionReturn information about the underlying WebSocket session.Methods inherited from class org.springframework.graphql.server.WebGraphQlRequest
getAttributes, getCookies, getHeaders, getUri
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
-
WebSocketGraphQlRequest
@Deprecated public WebSocketGraphQlRequest(URI uri, HttpHeaders headers, Map<String, Object> body, String id, @Nullable Locale locale, WebSocketSessionInfo sessionInfo) Deprecated.as of 1.1.3 in favor of the constructor with cookiesCreate an instance. -
WebSocketGraphQlRequest
public WebSocketGraphQlRequest(URI uri, HttpHeaders headers, @Nullable MultiValueMap<String, HttpCookie> cookies, Map<String, Object> attributes, Map<String, Object> body, String id, @Nullable Locale locale, WebSocketSessionInfo sessionInfo) Create an instance.- Parameters:
uri
- the URL for the HTTP request or WebSocket handshakeheaders
- the HTTP request headerscookies
- the HTTP request cookiesattributes
- session attributesbody
- the deserialized content of the GraphQL requestid
- the id from the GraphQL over WebSocket"subscribe"
messagelocale
- the locale from the HTTP request, if anysessionInfo
- the WebSocket session id- Since:
- 1.1.3
-
-
Method Details
-
getSessionInfo
Return information about the underlying WebSocket session.
-