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 GraphqlControllerExecutionResult(ExecutionResult executionResult, IExecutionDataDictionary executionData) { ExecutionResult = executionResult ?? throw new ArgumentNullException(nameof(executionResult)); ExecutionData = executionData ?? throw new ArgumentNullException(nameof(executionData)); }
public static HttpContext GetHttpContext(this IExecutionDataDictionary data) { return(data["HttpContext"] as HttpContext); }
public static bool IsHttpRequest(this IExecutionDataDictionary data) { return(data.ContainsKey("IsHttpRequest")); }