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
sessionId
stringThe operation sessionId given by the client. The sessionId must be unique within the ISocketSession.
Returns
- bool
Returns
true
if the operation was still executing and managed by this operation manager. Returnsfalse
if no operation existed with the providedsessionId
within this operation manager.
Enqueue(string, GraphQLRequest)
Enqueues a request for execution with the operation manager.
bool Enqueue(string sessionId, GraphQLRequest request)
Parameters
sessionId
stringThe operation sessionId given by the client. The sessionId must be unique within the ISocketSession.
request
GraphQLRequestThe GraphQL request that shall be executed.
Returns
- bool
Returns
true
if therequest
was accepted and registered for execution.