public void Configure(IApplicationBuilder app, CarvedRockDbContext dbContext) { //app.MVC() is not needed here. Activate to activate both Controller support( REST) and GraphQL app.UseGraphQL <CarvedRockSchema>(); app.UseGraphQLPlayground(new GraphQLPlaygroundOptions()); dbContext.Seed(); }
public void Configure(IApplicationBuilder app, CarvedRockDbContext dbContext) { app.UseGraphQL <CarvedRockSchema>(); app.UseGraphQLPlayground(); //app.UseGraphQLPlayground(new PlaygroundOptions()); dbContext.Seed(); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, CarvedRockDbContext dbContext) { dbContext.Seed(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); //app.UseSwagger(); //app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "CarvedRock.Api v1")); } // add http for Schema at default url /graphql app.UseGraphQL <ISchema>(); // use graphql-playground at default url /ui/playground app.UseGraphQLPlayground(); //app.UseHttpsRedirection(); //app.UseRouting(); //app.UseAuthorization(); //app.UseEndpoints(endpoints => //{ // endpoints.MapControllers(); //}); }
public void Configure(IApplicationBuilder app, CarvedRockDbContext dbContext) { app.UseWebSockets(); app.UseGraphQLWebSockets <CarvedRockSchema>("/graphql"); app.UseGraphQL <CarvedRockSchema>(); app.UseGraphQLPlayground(new GraphQLPlaygroundOptions()); dbContext.Seed(); }
public void Configure(IApplicationBuilder app, CarvedRockDbContext dbContext) { app.UseCors(builder => builder.AllowAnyOrigin().AllowAnyHeader().AllowAnyMethod()); app.UseWebSockets(); app.UseGraphQLWebSockets <CarvedRockSchema>(); app.UseGraphQL <CarvedRockSchema>(); app.UseGraphQLPlayground(new GraphQLPlaygroundOptions()); dbContext.Seed(); }
public void Configure(IApplicationBuilder app, CarvedRockDbContext dbContext) { app.UseGraphQL <CarvedRockSchema>(); // In argument we can specify the endpoint URI, /GraphQl default app.UseGraphQLPlayground(new GraphQLPlaygroundOptions()); // To play around with the API without web application ( web app not yet created ) // Sets up the default GraphQL playground at /ui/Playground // Project properties -> Debug -> Launch browser -> ui/Playground (starts the browser with the playground) // Fill the database dbContext.Seed(); }
public void Configure(IApplicationBuilder app, CarvedRockDbContext dbContext) { app.UseCors(builder => builder.AllowAnyOrigin().AllowAnyHeader().AllowAnyMethod()); //povolenie any origin, neaplikovat na produkcii app.UseWebSockets(); app.UseGraphQLWebSockets <CarvedRockSchema>("/graphql"); //pridanie graphql websockets endpointu do pipeliny app.UseGraphQL <CarvedRockSchema>(); //pridanie GraphQL middlewaru --> ako parameter je mozne uviest ENDPOINT, ak nie je uvedeny tak bude /graphql app.UseGraphQLPlayground(new GraphQLPlaygroundOptions()); //middleware pre GraphQL playground, options defaultne definuju playgroud dostupne na /ui/playground a je ocakavane, ze GraphQL je na endpointe /graphql (default pre GraphQL middleware) dbContext.Seed(); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, CarvedRockDbContext dbContext) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseHttpsRedirection(); app.UseRouting(); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); dbContext.Seed(); }
public void Configure(IApplicationBuilder app, CarvedRockDbContext dbContext) { app.UseMvc(); dbContext.Seed(); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, CarvedRockDbContext dbContext) { app.UseGraphQL <CarvedRockSchema>(); app.UseGraphQLPlayground(new GraphQLPlaygroundOptions()); dbContext.Seed(); }