Skip to content

Commit

Permalink
Fixed a bug #352
Browse files Browse the repository at this point in the history
  • Loading branch information
rstaib committed Jan 9, 2019
1 parent ad0eafd commit b96001d
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/Core/Core/Execution/QueryExecuter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,9 @@ private async Task<IExecutionResult> ExecuteMiddlewareAsync(
private IRequestServiceScope CreateServiceScope(
IServiceProvider requestServices)
{
IServiceScope serviceScope =
_applicationServices.CreateScope();

IServiceProvider services = requestServices ?? Schema.Services;

services = services == null
? serviceScope.ServiceProvider
: serviceScope.ServiceProvider.Include(requestServices);
IServiceScope serviceScope = _applicationServices.CreateScope();
IServiceProvider services = serviceScope.ServiceProvider
.Include(requestServices ?? Schema.Services);

return new RequestServiceScope(services, serviceScope);
}
Expand Down

0 comments on commit b96001d

Please sign in to comment.