StellaOps.Workflow.Transport.GraphQL

GraphQL transport of the workflow engine: sends GraphQL queries and mutations over HttpClient to configured targets.

library
Component
Workflow
Licence
BUSL-1.1 (Workflow licence)
Target framework
net10.0
Latest release
1.0.1-20261118T121708Z

Install

dotnet add package StellaOps.Workflow.Transport.GraphQL --version 1.0.1-20261118T121708Z

Namespaces

NamespaceTypes
StellaOps.Workflow.Transport.GraphQL6

namespace StellaOps.Workflow.Transport.GraphQL

TypeKindDescription
FailureTranslatingWorkflowGraphqlTransportclassThe registered IWorkflowGraphqlTransport: WorkflowGraphqlTransportwith the resilience pipeline’s timeout reported as a TimeoutException, and an unreachable target or an open circuit breaker answered as a failed response.
GraphqlWorkflowTransportRoutineclassDependency-injection routine of the GraphQL transport.
WorkflowGraphqlTargetOptionsclassOne GraphQL target: its endpoint URL and the headers every call sends.
WorkflowGraphqlTransportclassNo description.
WorkflowGraphqlTransportOptionsclassTargets and retries of graphql calls (WorkflowGraphqlTransport): WorkflowGraphqlTransport:Targets:<target>:Url, with optional headers per target.
WorkflowGraphqlTransportServiceCollectionExtensionsclassRegisters the GraphQL transport of the Workflow engine.

class FailureTranslatingWorkflowGraphqlTransport

public sealed class FailureTranslatingWorkflowGraphqlTransport : IWorkflowGraphqlTransport

The registered IWorkflowGraphqlTransport: WorkflowGraphqlTransportwith the resilience pipeline’s timeout reported as a TimeoutException, and an unreachable target or an open circuit breaker answered as a failed response.

Members

MemberKindSummary
FailureTranslatingWorkflowGraphqlTransport(WorkflowGraphqlTransport, ILogger<FailureTranslatingWorkflowGraphqlTransport>)constructorThe registered IWorkflowGraphqlTransport: WorkflowGraphqlTransportwith the resilience pipeline’s timeout reported as a TimeoutException, and an unreachable target or an open circuit breaker answered as a failed response.
ExecuteAsync(WorkflowGraphqlRequest, CancellationToken)methodSends the query and returns the response.

constructor FailureTranslatingWorkflowGraphqlTransport(WorkflowGraphqlTransport, ILogger<FailureTranslatingWorkflowGraphqlTransport>) #

public FailureTranslatingWorkflowGraphqlTransport(WorkflowGraphqlTransport inner, ILogger<FailureTranslatingWorkflowGraphqlTransport> logger)

The registered IWorkflowGraphqlTransport: WorkflowGraphqlTransportwith the resilience pipeline’s timeout reported as a TimeoutException, and an unreachable target or an open circuit breaker answered as a failed response.

method ExecuteAsync(WorkflowGraphqlRequest, CancellationToken) #

public Task<WorkflowGraphqlResponse> ExecuteAsync(WorkflowGraphqlRequest request, CancellationToken cancellationToken = default)

Sends the query and returns the response. A failure, such as a non-success status or an errors array in the response, is a response that did not succeed; a call that does not answer in time raises a TimeoutException.

Parameters

  • request: The GraphQL request.
  • cancellationToken: Cancels the operation.

Returns

The response.

class GraphqlWorkflowTransportRoutine

public sealed class GraphqlWorkflowTransportRoutine : IDependencyInjectionRoutine

Dependency-injection routine of the GraphQL transport. A host that loads this assembly as a plug-in discovers the routine; it registers exactly what WorkflowGraphqlTransportServiceCollectionExtensions.AddWorkflowGraphqlTransport(IServiceCollection, IConfiguration)registers.

Members

MemberKindSummary
GraphqlWorkflowTransportRoutine()constructorCreates an instance of GraphqlWorkflowTransportRoutine.
Register(IServiceCollection, IConfiguration)methodRegisters what WorkflowGraphqlTransportServiceCollectionExtensions.AddWorkflowGraphqlTransport(IServiceCollection, IConfiguration)registers.

constructor GraphqlWorkflowTransportRoutine() #

public GraphqlWorkflowTransportRoutine()

Creates an instance of GraphqlWorkflowTransportRoutine.

method Register(IServiceCollection, IConfiguration) #

public IServiceCollection Register(IServiceCollection services, IConfiguration configuration)

Registers what WorkflowGraphqlTransportServiceCollectionExtensions.AddWorkflowGraphqlTransport(IServiceCollection, IConfiguration)registers.

Parameters

  • services: The service collection.
  • configuration: The host configuration.

Returns

The same service collection.

class WorkflowGraphqlTargetOptions

public sealed class WorkflowGraphqlTargetOptions

One GraphQL target: its endpoint URL and the headers every call sends.

Members

MemberKindSummary
WorkflowGraphqlTargetOptions()constructorCreates an instance of WorkflowGraphqlTargetOptions.
HeaderspropertyHeaders sent with every call to the target.
UrlpropertyThe GraphQL endpoint URL of the target.

constructor WorkflowGraphqlTargetOptions() #

public WorkflowGraphqlTargetOptions()

Creates an instance of WorkflowGraphqlTargetOptions.

property Headers #

public IDictionary<string, string> Headers { get; init; }

Headers sent with every call to the target.

property Url #

public string Url { get; init; }

The GraphQL endpoint URL of the target.

class WorkflowGraphqlTransport

public sealed class WorkflowGraphqlTransport : IWorkflowGraphqlTransport

No description.

Members

MemberKindSummary
WorkflowGraphqlTransport(IHttpClientFactory, IOptions<WorkflowGraphqlTransportOptions>, ILogger<WorkflowGraphqlTransport>)constructorNo description.
HttpClientNameconstantNo description.
ExecuteAsync(WorkflowGraphqlRequest, CancellationToken)methodNo description.

constructor WorkflowGraphqlTransport(IHttpClientFactory, IOptions<WorkflowGraphqlTransportOptions>, ILogger<WorkflowGraphqlTransport>) #

public WorkflowGraphqlTransport(IHttpClientFactory httpClientFactory, IOptions<WorkflowGraphqlTransportOptions> options, ILogger<WorkflowGraphqlTransport> logger)

No description.

constant HttpClientName #

public const string HttpClientName = "workflow-graphql-transport"

No description.

method ExecuteAsync(WorkflowGraphqlRequest, CancellationToken) #

public Task<WorkflowGraphqlResponse> ExecuteAsync(WorkflowGraphqlRequest request, CancellationToken cancellationToken = default)

No description.

class WorkflowGraphqlTransportOptions

public sealed class WorkflowGraphqlTransportOptions

Targets and retries of graphql calls (WorkflowGraphqlTransport): WorkflowGraphqlTransport:Targets:<target>:Url, with optional headers per target.

Members

MemberKindSummary
WorkflowGraphqlTransportOptions()constructorCreates an instance of WorkflowGraphqlTransportOptions.
SectionNameconstantThe configuration section the options bind from: WorkflowGraphqlTransport.
RetryCountpropertyRetries of a failed attempt in the resilience pipeline.
TargetspropertyThe targets that graphql calls name, by name.
TimeoutSecondspropertyTransport-level timeout in seconds for GraphQL calls.

constructor WorkflowGraphqlTransportOptions() #

public WorkflowGraphqlTransportOptions()

Creates an instance of WorkflowGraphqlTransportOptions.

constant SectionName #

public const string SectionName = "WorkflowGraphqlTransport"

The configuration section the options bind from: WorkflowGraphqlTransport.

property RetryCount #

public int RetryCount { get; set; }

Retries of a failed attempt in the resilience pipeline. The default is 3.

property Targets #

public IDictionary<string, WorkflowGraphqlTargetOptions> Targets { get; init; }

The targets that graphql calls name, by name.

property TimeoutSeconds #

public int? TimeoutSeconds { get; set; }

Transport-level timeout in seconds for GraphQL calls. Null means no transport-level override.

class WorkflowGraphqlTransportServiceCollectionExtensions

public static class WorkflowGraphqlTransportServiceCollectionExtensions

Registers the GraphQL transport of the Workflow engine.

Members

MemberKindSummary
AddWorkflowGraphqlTransport(IServiceCollection, IConfiguration)extension methodRegisters WorkflowGraphqlTransportas the IWorkflowGraphqlTransport, with its named HTTP client and resilience pipeline, from the {WorkflowGraphqlTransportOptions.SectionName} section.

extension method AddWorkflowGraphqlTransport(IServiceCollection, IConfiguration) #

public static IServiceCollection AddWorkflowGraphqlTransport(this IServiceCollection services, IConfiguration configuration)

Registers WorkflowGraphqlTransportas the IWorkflowGraphqlTransport, with its named HTTP client and resilience pipeline, from the {WorkflowGraphqlTransportOptions.SectionName} section.