// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, IHeroTaskListDbContext dbContext, IDbContextSeeder contextSeeder) { app.UseGraphiQl("/graphql"); app.UseWebSockets(); app.UseGraphQLWebSockets <HeroTaskListSchema>("/graphql"); app.UseGraphQL <HeroTaskListSchema>(); dbContext.Migrate(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseGraphQLPlayground(new GraphQLPlaygroundOptions()); contextSeeder.Seed(dbContext); }
public SeedController(IDbContextSeeder dbContextSeeder) { this.dbContextSeeder = dbContextSeeder; }