Table of Contents

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 string

The 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. Returns false if no operation existed with the provided sessionId within this operation manager.

Enqueue(string, GraphQLRequest)

Enqueues a request for execution with the operation manager.

bool Enqueue(string sessionId, GraphQLRequest request)

Parameters

sessionId string

The operation sessionId given by the client. The sessionId must be unique within the ISocketSession.

request GraphQLRequest

The GraphQL request that shall be executed.

Returns

bool

Returns true if the request was accepted and registered for execution.