Merge pull request #19530 from bigbluebutton/revert-19523-middleware-stop-retransmitting-mutations

Revert "Prevent graphql-middlware from re-transmitting Mutations"
This commit is contained in:
Gustavo Trott 2024-01-26 14:43:01 -03:00 committed by GitHub
commit a288d84e1e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -96,23 +96,20 @@ RangeLoop:
jsonPatchSupported = true
}
//Not storing Mutations because they will not be retransmitted in case of reconnection
if messageType != common.Mutation {
browserConnection.ActiveSubscriptionsMutex.Lock()
browserConnection.ActiveSubscriptions[queryId] = common.GraphQlSubscription{
Id: queryId,
Message: fromBrowserMessageAsMap,
OperationName: operationName,
StreamCursorField: streamCursorField,
StreamCursorVariableName: streamCursorVariableName,
StreamCursorCurrValue: streamCursorInitialValue,
LastSeenOnHasuraConnetion: hc.Id,
JsonPatchSupported: jsonPatchSupported,
Type: messageType,
}
// log.Tracef("Current queries: %v", browserConnection.ActiveSubscriptions)
browserConnection.ActiveSubscriptionsMutex.Unlock()
browserConnection.ActiveSubscriptionsMutex.Lock()
browserConnection.ActiveSubscriptions[queryId] = common.GraphQlSubscription{
Id: queryId,
Message: fromBrowserMessageAsMap,
OperationName: operationName,
StreamCursorField: streamCursorField,
StreamCursorVariableName: streamCursorVariableName,
StreamCursorCurrValue: streamCursorInitialValue,
LastSeenOnHasuraConnetion: hc.Id,
JsonPatchSupported: jsonPatchSupported,
Type: messageType,
}
// log.Tracef("Current queries: %v", browserConnection.ActiveSubscriptions)
browserConnection.ActiveSubscriptionsMutex.Unlock()
}
if fromBrowserMessageAsMap["type"] == "stop" {