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 GraphQLTransportServiceCollectionExtensionsInheritance
Section titled “Inheritance”object ← GraphQLTransportServiceCollectionExtensions
Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Methods
Section titled “Methods”AddGraphQLTransport(IServiceCollection)
Section titled “ AddGraphQLTransport(IServiceCollection)”Adds the GraphQL transport mapper and GraphQL server services to the service collection.
public static IServiceCollection AddGraphQLTransport(this IServiceCollection services)Parameters
Section titled “Parameters”services IServiceCollection
The target service collection.
Returns
Section titled “Returns”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)Parameters
Section titled “Parameters”builder WebApplicationBuilder
The ASP.NET Core application builder to extend.
Returns
Section titled “Returns”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)Parameters
Section titled “Parameters”services IServiceCollection
The service collection that owns the transport registration.
configure Action<IObjectTypeDescriptor>
The callback that adds fields, arguments, and resolvers to Mutation.
Returns
Section titled “Returns”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)Parameters
Section titled “Parameters”builder WebApplicationBuilder
The ASP.NET Core application builder to extend.
configure Action<IObjectTypeDescriptor>
The callback that adds fields, arguments, and resolvers to Mutation.
Returns
Section titled “Returns”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)Parameters
Section titled “Parameters”services IServiceCollection
The service collection that owns the transport registration.
configure Action<IObjectTypeDescriptor>
The callback that adds fields, arguments, and resolvers to Query.
Returns
Section titled “Returns”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)Parameters
Section titled “Parameters”builder WebApplicationBuilder
The ASP.NET Core application builder to extend.
configure Action<IObjectTypeDescriptor>
The callback that adds fields, arguments, and resolvers to Query.
Returns
Section titled “Returns”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)Parameters
Section titled “Parameters”services IServiceCollection
The service collection that owns the transport registration.
configure Action<IObjectTypeDescriptor>
The callback that adds fields, arguments, and resolvers to Subscription.
Returns
Section titled “Returns”The same service collection for fluent composition.
Remarks
Section titled “Remarks”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
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)Parameters
Section titled “Parameters”builder WebApplicationBuilder
The ASP.NET Core application builder to extend.
configure Action<IObjectTypeDescriptor>
The callback that adds fields, arguments, and resolvers to Subscription.
Returns
Section titled “Returns”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)Parameters
Section titled “Parameters”services IServiceCollection
The service collection that owns the transport registration.
configure Action<IRequestExecutorBuilder>
The callback that extends the GraphQL request executor builder.
Returns
Section titled “Returns”The same service collection for fluent composition.
Remarks
Section titled “Remarks”Hosts typically call 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)Parameters
Section titled “Parameters”builder WebApplicationBuilder
The ASP.NET Core application builder to extend.
configure Action<IRequestExecutorBuilder>
The callback that extends the GraphQL request executor builder.
Returns
Section titled “Returns”The same builder instance for fluent composition.