// in Startup: void ConfigureServices(ISeviceCollection services)
services.AddModules(builder => {
builder.UseGraphQLServerModules().AddModule<FooModule>();
});
// in Startup: void Configure(IApplicationBuilder app, IWebHostEnvironment env)
app.UseEndpoints(endpoints =>
{
// modules mapper
endpoints.MapGraphQLServerModuleEndpoints(postMapEndpoint: (module, builder) =>
{
builder.RequireCors(cors =>
{
cors.AllowAnyOrigin().AllowAnyHeader().AllowAnyMethod();
});
});
});
Modulight.Modules.Server.GraphQL
Folders and files
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||