Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

In case you're interested . . . #12

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion StarWars.Api/Controllers/GraphQLController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public async Task<IActionResult> Post([FromBody] GraphQLQuery query)

try
{
// Test
var result = await _documentExecuter.ExecuteAsync(executionOptions).ConfigureAwait(false);

if (result.Errors?.Count > 0)
Expand All @@ -52,7 +53,7 @@ public async Task<IActionResult> Post([FromBody] GraphQLQuery query)
}
catch (Exception ex)
{
_logger.LogError("Document exexuter exception", ex);
_logger.LogError("Document executer exception", ex);
return BadRequest(ex);
}
}
Expand Down
1 change: 1 addition & 0 deletions StarWars.Api/StarWars.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<ItemGroup>
<PackageReference Include="AutoMapper" Version="6.0.2" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="2.0.0" />
<PackageReference Include="GraphiQL" Version="1.0.0" />
<PackageReference Include="GraphQL" Version="0.15.1.678" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Routing" Version="1.1.1" />
Expand Down
1 change: 1 addition & 0 deletions StarWars.Api/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env,
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
loggerFactory.AddDebug();

app.UseGraphiQl();
app.UseStaticFiles();
app.UseMvc();

Expand Down
2 changes: 1 addition & 1 deletion StarWars.Data/EntityFramework/StarWarsContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public StarWarsContext(DbContextOptions options, ILogger<StarWarsContext> logger
{
_logger = logger;
//Database.EnsureCreated();
//Database.Migrate();
Database.Migrate();
}

protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
Expand Down