Closed cepoiubogdan-query-labs closed 2 months ago
Can you share a minimal sample application that we can take a look at?
What would you like to see in more detail?
an example of the intercept method would look like this:
@Override
public Mono<WebGraphQlResponse> intercept(WebGraphQlRequest request,
Chain chain)
{
try
{
if (request != null)
{
if (request instanceof WebSocketGraphQlRequest)
{
WebSocketGraphQlRequest wsRequests = (WebSocketGraphQlRequest) request;
WebSocketSessionInfo sessionInfo = wsRequests
.getSessionInfo();
Map<String, Object> extensions = request.getExtensions();
log.info(new StringBuilder()
.append("Intercepting websocket request")
.append("; operationName=[")
.append(request.getOperationName()).append("]")
.append(", clientId=[")
.append(SessionUtils.getAttributeFromMap(extensions,
SessionUtils.CLIENT_ID))
.append("]")
.append(", sessionId=[")
.append(sessionInfo.getId()).append("]")
.append(", remoteAddress=[")
.append(String.valueOf(
sessionInfo.getRemoteAddress()))
.append("]")
.toString());
sessionService.initializeJwtSession(wsRequests);
}
else
{
if (log.isDebugEnabled())
log.debug(new StringBuilder()
.append("Intercepting request")
.append("; operationName=[")
.append(request.getOperationName()).append("]")
.append(", clientId=[")
.append(SessionUtils
.getClientId(request.getHeaders()))
.append("]")
.append(", remoteAddress=[")
.append(request.getHeaders()
.getFirst(SessionUtils.REAL_IP))
.append("]")
.toString());
}
}
return WebSocketGraphQlInterceptor.super.intercept(request, chain);
}
catch (Throwable e)
{
log.error(new StringBuilder()
.append("Exception occured during processing request")
.append("; request=[").append(request).append("]")
.toString(), e);
return Mono.error(e);
}
}
We are currently using graphql-java version 21.3 Java Springboot 3.2.3, Spring graphql 1.2.5, and Spring security 3.2.3
@cepoiubogdan-query-labs you need to do more investigation to understand the root cause for the error. If you provide a small isolated sample, we can have a look, but as it is the information provided is insufficient to understand or reproduce the issue.
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.
Hello! I am implementing WebSocketGraphQlInterceptor for a webapplication, but the intercept method keeps returning
Regardles of what I do first we have tried overriding the method, to adapt to our code, without success, an then we have tried without overriding the method, the result is still the same. We are using Springboot 3.2.3.