private async Task ExecuteOperationBatchAsync( HttpContext context, IServiceProvider services, GraphQLRequest request, IReadOnlyList <string> operationNames) { IReadOnlyList <IReadOnlyQueryRequest> requestBatch = await BuildBatchRequestAsync( context, services, request, operationNames) .ConfigureAwait(false); IResponseStream responseStream = await _batchExecutor .ExecuteAsync(requestBatch, context.GetCancellationToken()) .ConfigureAwait(false); SetResponseHeaders( context.Response, _streamSerializer.ContentType); await _streamSerializer.SerializeAsync( responseStream, context.Response.Body, context.GetCancellationToken()) .ConfigureAwait(false); }
private async Task ExecuteOperationBatchAsync( HttpHelper httpHelper, GraphQLRequest request, IReadOnlyList <string> operationNames) { IReadOnlyList <IReadOnlyQueryRequest> requestBatch = await BuildBatchRequestAsync( httpHelper.Context, httpHelper.Services, request, operationNames) .ConfigureAwait(false); httpHelper.StatusCode = OK; httpHelper.StreamSerializer = _streamSerializer; httpHelper.Result = await _batchExecutor .ExecuteAsync(requestBatch, httpHelper.Context.RequestAborted) .ConfigureAwait(false); }