Interface IOperationManager
- Namespace
- HotChocolate.AspNetCore.Subscriptions
- Assembly
- HotChocolate.AspNetCore.dll
The operation manager provides access to registered running operation within a socket session. The operation manager ensures that operation are correctly tracked and cleaned up after they have been completed.
public interface IOperationManager : IEnumerable<IOperationSession>, IEnumerable, IDisposable
- Inherited Members
Methods
Complete(string)
Completes a request that was previously enqueued with the operation manager.
bool Complete(string sessionId)
Parameters
sessionIdstringThe operation sessionId given by the client. The sessionId must be unique within the ISocketSession.
Returns
- bool
Returns
trueif the operation was still executing and managed by this operation manager. Returnsfalseif no operation existed with the providedsessionIdwithin this operation manager.
Enqueue(string, GraphQLRequest)
Enqueues a request for execution with the operation manager.
bool Enqueue(string sessionId, GraphQLRequest request)
Parameters
sessionIdstringThe operation sessionId given by the client. The sessionId must be unique within the ISocketSession.
requestGraphQLRequestThe GraphQL request that shall be executed.
Returns
- bool
Returns
trueif therequestwas accepted and registered for execution.