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