ข้ามไปยังเนื้อหา

Class GraphqlHttpBehaviorBinding

เนื้อหานี้ยังไม่ได้แปลเป็นภาษาไทย แสดงเป็นภาษาอังกฤษแทน

Namespace: Cephalon.Behaviors.Http.Bindings
Assembly: Cephalon.Behaviors.Http.dll

GraphQL HTTP transport binding (transport ID: http.graphql). Accepts canonical routes such as POST /graphql/v1/cart/get. The request body uses a standard GraphQL envelope and the variables object is dispatched as the behavior input.

public sealed class GraphqlHttpBehaviorBinding : IHttpBehaviorBinding

objectGraphqlHttpBehaviorBinding

IHttpBehaviorBinding

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

GraphqlHttpBehaviorBinding(IConfiguration?)

Section titled “ GraphqlHttpBehaviorBinding(IConfiguration?)”

Initializes a new .

public GraphqlHttpBehaviorBinding(IConfiguration? configuration = null)

configuration IConfiguration?

Optional configuration used to resolve canonical behavior transport routes. When omitted, the binding falls back to the default /graphql/v1 route policy.

Gets the canonical transport identifier, e.g. http.jsonrpc.

public string TransportId { get; }

string

MapAsync(WebApplication, BehaviorTopologyDescriptor, BehaviorDispatcher)

Section titled “ MapAsync(WebApplication, BehaviorTopologyDescriptor, BehaviorDispatcher)”

Maps the behavior’s routes/endpoints onto the . Called at most once per descriptor per transport (lazy-init guards ensure this).

public Task MapAsync(WebApplication app, BehaviorTopologyDescriptor descriptor, BehaviorDispatcher dispatcher)

app WebApplication

The web application to register routes on.

descriptor BehaviorTopologyDescriptor

The behavior topology descriptor.

dispatcher BehaviorDispatcher

The behavior dispatcher to invoke.

Task

A task that completes when all routes are mapped.