Class BowireGraphQLProtocol

Namespace
Kuestenlogik.Bowire.Protocol.GraphQL
Assembly
Kuestenlogik.Bowire.Protocol.GraphQL.dll

Bowire protocol plugin for GraphQL. Discovers a remote schema via introspection (Kuestenlogik.Bowire.Protocol.GraphQL.GraphQLIntrospectionQuery), surfaces the query / mutation / subscription root operations as services, and invokes them by building a parameterised operation string with Kuestenlogik.Bowire.Protocol.GraphQL.GraphQLQueryBuilder.

public sealed class BowireGraphQLProtocol : IBowireProtocol, IDisposable
Inheritance
BowireGraphQLProtocol
Implements
Inherited Members

Constructors

BowireGraphQLProtocol()

public BowireGraphQLProtocol()

Fields

SubscriptionTransportMetadataKey

Optional metadata key. Set to ws to force the graphql-transport-ws transport, or sse to force graphql-sse. When unset, the plugin tries WebSocket first (if the WebSocket plugin is loaded) and falls back to SSE.

public const string SubscriptionTransportMetadataKey = "X-Bowire-GraphQL-Subscription-Transport"

Field Value

string

Properties

Description

One-line description shown next to the plugin's display name in Settings → Plugins. Optional; defaults to empty so the row falls back to "DisplayName + version" without the description line. Keep it short (≤ 100 characters) — the row truncates anything wider than the manage panel.

public string Description { get; }

Property Value

string

IconSvg

SVG icon for the protocol tab.

public string IconSvg { get; }

Property Value

string

Id

Short identifier (e.g., "grpc", "signalr").

public string Id { get; }

Property Value

string

Name

Protocol name shown in UI tabs.

public string Name { get; }

Property Value

string

Methods

DiscoverAsync(string, bool, CancellationToken)

Discover available services and methods.

public Task<List<BowireServiceInfo>> DiscoverAsync(string serverUrl, bool showInternalServices, CancellationToken ct = default)

Parameters

serverUrl string
showInternalServices bool
ct CancellationToken

Returns

Task<List<BowireServiceInfo>>

Dispose()

Dispose the lazily-built HttpClient. Same lifecycle contract as the REST plugin — the registry that owns the plugin instance disposes it at host shutdown.

public void Dispose()

Initialize(IServiceProvider?)

Called after registration to inject the app's service provider (embedded mode).

public void Initialize(IServiceProvider? serviceProvider)

Parameters

serviceProvider IServiceProvider

InvokeAsync(string, string, string, List<string>, bool, Dictionary<string, string>?, CancellationToken)

Invoke a unary or client-streaming call.

public Task<InvokeResult> InvokeAsync(string serverUrl, string service, string method, List<string> jsonMessages, bool showInternalServices, Dictionary<string, string>? metadata = null, CancellationToken ct = default)

Parameters

serverUrl string
service string
method string
jsonMessages List<string>
showInternalServices bool
metadata Dictionary<string, string>
ct CancellationToken

Returns

Task<InvokeResult>

InvokeStreamAsync(string, string, string, List<string>, bool, Dictionary<string, string>?, CancellationToken)

Invoke a server-streaming or duplex call.

public IAsyncEnumerable<string> InvokeStreamAsync(string serverUrl, string service, string method, List<string> jsonMessages, bool showInternalServices, Dictionary<string, string>? metadata = null, CancellationToken ct = default)

Parameters

serverUrl string
service string
method string
jsonMessages List<string>
showInternalServices bool
metadata Dictionary<string, string>
ct CancellationToken

Returns

IAsyncEnumerable<string>

OpenChannelAsync(string, string, string, bool, Dictionary<string, string>?, CancellationToken)

Open an interactive channel (for duplex/client-streaming).

public Task<IBowireChannel?> OpenChannelAsync(string serverUrl, string service, string method, bool showInternalServices, Dictionary<string, string>? metadata = null, CancellationToken ct = default)

Parameters

serverUrl string
service string
method string
showInternalServices bool
metadata Dictionary<string, string>
ct CancellationToken

Returns

Task<IBowireChannel>