Skip to content

Commit 7c2b3bd

Browse files
committed
Added getConnectResult to GraphQLContext for now
1 parent 9eb9dde commit 7c2b3bd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main/java/graphql/servlet/GraphQLContext.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ public Optional<Session> getSession() {
6464
return Optional.ofNullable(session);
6565
}
6666

67+
public Optional<Object> getConnectResult() {
68+
if (session != null) {
69+
return Optional.ofNullable(session.getUserProperties().get(ApolloSubscriptionConnectionListener.CONNECT_RESULT_KEY));
70+
}
71+
return Optional.empty();
72+
}
73+
6774
public Optional<HandshakeRequest> getHandshakeRequest() {
6875
return Optional.ofNullable(handshakeRequest);
6976
}

0 commit comments

Comments
 (0)