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
-
Field Summary
Fields inherited from class org.springframework.graphql.support.DefaultGraphQlRequest
EXTENSIONS_KEY, OPERATION_NAME_KEY, QUERY_KEY, VARIABLES_KEY
-
Constructor Summary
ConstructorDescriptionWebSocketGraphQlRequest
(URI uri, HttpHeaders headers, MultiValueMap<String, HttpCookie> cookies, InetSocketAddress remoteAddress, Map<String, Object> attributes, Map<String, Object> body, String id, Locale locale, WebSocketSessionInfo sessionInfo) Create an instance.WebSocketGraphQlRequest
(URI uri, HttpHeaders headers, MultiValueMap<String, HttpCookie> cookies, Map<String, Object> attributes, Map<String, Object> body, String id, Locale locale, WebSocketSessionInfo sessionInfo) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionReturn information about the underlying WebSocket session.Methods inherited from class org.springframework.graphql.server.WebGraphQlRequest
getAttributes, getCookies, getHeaders, getRemoteAddress, 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
public WebSocketGraphQlRequest(URI uri, HttpHeaders headers, @Nullable MultiValueMap<String, HttpCookie> cookies, @Nullable InetSocketAddress remoteAddress, 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 cookiesremoteAddress
- the client remote addressattributes
- 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.3.0
-
WebSocketGraphQlRequest
@Deprecated(since="1.3.0", forRemoval=true) 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) Deprecated, for removal: This API element is subject to removal in a future version.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.
-
WebSocketGraphQlRequest(URI, HttpHeaders, MultiValueMap, InetSocketAddress, Map, Map, String, Locale, WebSocketSessionInfo)