ExecuteAsync(IGraphQLExecutionBuilder executionBuilder, GraphQlRequest request, Type rootType, ExecutionDataDictionary data, CancellationToken cancellationToken) { var schema = _schemaResolver.GetSchema(rootType); var serviceProvider = _scopedServiceProviderResolver.GetProvider(); var documentExecuterMiddleware = new DocumentExecuterMidleware(schema, serviceProvider); var execution = executionBuilder.BuildExecution(request, documentExecuterMiddleware, data, serviceProvider, cancellationToken); return(execution.ExecuteAsync()); }
public ExecutionContext(GraphQlRequest request, IExecutionDataDictionary data, CancellationToken cancellationToken) { Request = request; Result = null; FieldMiddleware = new FieldMiddlewareBuilder(); ValidationRules = new List <IValidationRule>(); ExecutionData = data; CancellationToken = cancellationToken; UserContext = new Dictionary <string, object>(); Listeners = new List <IDocumentExecutionListener>(); ComplexityConfiguration = new ComplexityConfiguration(); EnableMetrics = false; ExposeExceptions = false; MaxParallelExecutionCount = null; ThrowOnUnhandledException = false; UnhandledExceptionDelegate = null; }
public Task <GraphqlControllerExecutionResult> ExecuteAsync <T> (IGraphQLExecutionBuilder executionBuilder, GraphQlRequest request, ExecutionDataDictionary data, CancellationToken cancellationToken) => ExecuteAsync(executionBuilder, request, typeof(T), data, cancellationToken);