public static IDragonFlyApplicationBuilder UseRestApi(this IDragonFlyApplicationBuilder builder) { builder.Map("/api", x => { x.UseRouting(); x.UseEndpoints(endpoints => { endpoints.MapContentItemRestApi(); endpoints.MapContentSchemaRestApi(); endpoints.MapAssetRestApi(); endpoints.MapAssetFolderRestApi(); endpoints.MapWebHookRestApi(); }); }); return(builder); }
public static IDragonFlyApplicationBuilder UseGraphQLApi(this IDragonFlyApplicationBuilder builder) { builder.Map("/graphql", x => { x.UseRouting(); x.UseAuthentication(); x.UseAuthorization(); //x.UseGraphQL<>(); x.UseGraphQLPlayground(new GraphQLPlaygroundOptions { Path = "/ui/playground" }); x.UseEndpoints(endpoints => { }); }); return(builder); }