// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, GraphQlDbContext dbContext) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } dbContext.Database.EnsureCreated(); app.UseGraphiQl("/graphql"); app.UseGraphQL <ISchema>(); }
public static void SeedHostDb(GraphQlDbContext context) { context.SuppressAutoSetTenantId = true; // Host seed new InitialHostDbBuilder(context).Create(); // Default tenant seed (in host database). new DefaultTenantBuilder(context).Create(); new TenantRoleAndUserBuilder(context, 1).Create(); }
public CustomerQuery(GraphQlDbContext appContext) { this._appContext = appContext; Name = "Query"; Field <ListGraphType <CustomerGraphType> >("customers", "Returns a list of Customer", resolve: context => _appContext.Customers.ToList()); Field <CustomerGraphType>("customer", "Returns a Single Customer", new QueryArguments(new QueryArgument <NonNullGraphType <IntGraphType> > { Name = "id", Description = "Customer Id" }), context => _appContext.Customers.Single(x => x.Id == context.Arguments["id"].GetPropertyValue <int>())); }
public SubMenuService(GraphQlDbContext dbContext) { _dbContext = dbContext; }
public DefaultEditionCreator(GraphQlDbContext context) { _context = context; }
public ReservationService(GraphQlDbContext dbContext) { _dbContext = dbContext; }
public HostRoleAndUserCreator(GraphQlDbContext context) { _context = context; }
public InitialHostDbBuilder(GraphQlDbContext context) { _context = context; }
public TenantRoleAndUserBuilder(GraphQlDbContext context, int tenantId) { _context = context; _tenantId = tenantId; }
public DefaultLanguagesCreator(GraphQlDbContext context) { _context = context; }
public DefaultSettingsCreator(GraphQlDbContext context) { _context = context; }
public DefaultTenantBuilder(GraphQlDbContext context) { _context = context; }