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

Class GraphQLTransportServiceCollectionExtensions

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

Namespace: Cephalon.AspNetCore.GraphQL.Hosting
Assembly: Cephalon.AspNetCore.GraphQL.dll

Registers the GraphQL ASP.NET Core transport adapter for Cephalon.

public static class GraphQLTransportServiceCollectionExtensions

objectGraphQLTransportServiceCollectionExtensions

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

Adds the GraphQL transport mapper and GraphQL server services to the service collection.

public static IServiceCollection AddGraphQLTransport(this IServiceCollection services)

services IServiceCollection

The target service collection.

IServiceCollection

The same service collection for further registration.

AddGraphQLTransport(WebApplicationBuilder)

Section titled “ AddGraphQLTransport(WebApplicationBuilder)”

Adds the GraphQL transport mapper and GraphQL server services to a .

public static WebApplicationBuilder AddGraphQLTransport(this WebApplicationBuilder builder)

builder WebApplicationBuilder

The ASP.NET Core application builder to extend.

WebApplicationBuilder

The same builder instance for fluent composition.

ConfigureGraphQLMutation(IServiceCollection, Action<IObjectTypeDescriptor>)

Section titled “ ConfigureGraphQLMutation(IServiceCollection, Action<IObjectTypeDescriptor>)”

Adds fields to the shared GraphQL mutation root used by Cephalon modules.

public static IServiceCollection ConfigureGraphQLMutation(this IServiceCollection services, Action<IObjectTypeDescriptor> configure)

services IServiceCollection

The service collection that owns the transport registration.

configure Action<IObjectTypeDescriptor>

The callback that adds fields, arguments, and resolvers to Mutation.

IServiceCollection

The same service collection for fluent composition.

ConfigureGraphQLMutation(WebApplicationBuilder, Action<IObjectTypeDescriptor>)

Section titled “ ConfigureGraphQLMutation(WebApplicationBuilder, Action<IObjectTypeDescriptor>)”

Adds fields to the shared GraphQL mutation root on a .

public static WebApplicationBuilder ConfigureGraphQLMutation(this WebApplicationBuilder builder, Action<IObjectTypeDescriptor> configure)

builder WebApplicationBuilder

The ASP.NET Core application builder to extend.

configure Action<IObjectTypeDescriptor>

The callback that adds fields, arguments, and resolvers to Mutation.

WebApplicationBuilder

The same builder instance for fluent composition.

ConfigureGraphQLQuery(IServiceCollection, Action<IObjectTypeDescriptor>)

Section titled “ ConfigureGraphQLQuery(IServiceCollection, Action<IObjectTypeDescriptor>)”

Adds fields to the shared GraphQL query root used by Cephalon modules.

public static IServiceCollection ConfigureGraphQLQuery(this IServiceCollection services, Action<IObjectTypeDescriptor> configure)

services IServiceCollection

The service collection that owns the transport registration.

configure Action<IObjectTypeDescriptor>

The callback that adds fields, arguments, and resolvers to Query.

IServiceCollection

The same service collection for fluent composition.

ConfigureGraphQLQuery(WebApplicationBuilder, Action<IObjectTypeDescriptor>)

Section titled “ ConfigureGraphQLQuery(WebApplicationBuilder, Action<IObjectTypeDescriptor>)”

Adds fields to the shared GraphQL query root on a .

public static WebApplicationBuilder ConfigureGraphQLQuery(this WebApplicationBuilder builder, Action<IObjectTypeDescriptor> configure)

builder WebApplicationBuilder

The ASP.NET Core application builder to extend.

configure Action<IObjectTypeDescriptor>

The callback that adds fields, arguments, and resolvers to Query.

WebApplicationBuilder

The same builder instance for fluent composition.

ConfigureGraphQLSubscription(IServiceCollection, Action<IObjectTypeDescriptor>)

Section titled “ ConfigureGraphQLSubscription(IServiceCollection, Action<IObjectTypeDescriptor>)”

Adds fields to the shared GraphQL subscription root used by Cephalon modules.

public static IServiceCollection ConfigureGraphQLSubscription(this IServiceCollection services, Action<IObjectTypeDescriptor> configure)

services IServiceCollection

The service collection that owns the transport registration.

configure Action<IObjectTypeDescriptor>

The callback that adds fields, arguments, and resolvers to Subscription.

IServiceCollection

The same service collection for fluent composition.

Subscription field registration only shapes the GraphQL schema. Modules or hosts still need to register a concrete Hot Chocolate subscription provider, such as AddInMemorySubscriptions(), through when they want GraphQL-over-SSE or GraphQL-over-WebSocket operations to execute.

ConfigureGraphQLSubscription(WebApplicationBuilder, Action<IObjectTypeDescriptor>)

Section titled “ ConfigureGraphQLSubscription(WebApplicationBuilder, Action<IObjectTypeDescriptor>)”

Adds fields to the shared GraphQL subscription root on a .

public static WebApplicationBuilder ConfigureGraphQLSubscription(this WebApplicationBuilder builder, Action<IObjectTypeDescriptor> configure)

builder WebApplicationBuilder

The ASP.NET Core application builder to extend.

configure Action<IObjectTypeDescriptor>

The callback that adds fields, arguments, and resolvers to Subscription.

WebApplicationBuilder

The same builder instance for fluent composition.

ConfigureGraphQLTransport(IServiceCollection, Action<IRequestExecutorBuilder>)

Section titled “ ConfigureGraphQLTransport(IServiceCollection, Action<IRequestExecutorBuilder>)”

Applies GraphQL schema configuration for Cephalon modules and hosts.

public static IServiceCollection ConfigureGraphQLTransport(this IServiceCollection services, Action<IRequestExecutorBuilder> configure)

services IServiceCollection

The service collection that owns the transport registration.

configure Action<IRequestExecutorBuilder>

The callback that extends the GraphQL request executor builder.

IServiceCollection

The same service collection for fluent composition.

Hosts typically call once, while individual modules use this method from ConfigureServices to add query, mutation, subscription, scalar, or type-extension registrations without forcing the engine core to know anything about the GraphQL implementation.

ConfigureGraphQLTransport(WebApplicationBuilder, Action<IRequestExecutorBuilder>)

Section titled “ ConfigureGraphQLTransport(WebApplicationBuilder, Action<IRequestExecutorBuilder>)”

Applies GraphQL schema configuration on a .

public static WebApplicationBuilder ConfigureGraphQLTransport(this WebApplicationBuilder builder, Action<IRequestExecutorBuilder> configure)

builder WebApplicationBuilder

The ASP.NET Core application builder to extend.

configure Action<IRequestExecutorBuilder>

The callback that extends the GraphQL request executor builder.

WebApplicationBuilder

The same builder instance for fluent composition.