/// <summary> /// Initializes a new instance of the <see cref="ResolveFieldContext"/> class. /// </summary> /// <param name="fieldName">Name of the field.</param> /// <param name="fieldAst">The field ast.</param> /// <param name="fieldDefinition">The field definition.</param> /// <param name="returnType">Type of the return.</param> /// <param name="parentType">Type of the parent.</param> /// <param name="arguments">The arguments.</param> /// <param name="rootValue">The root value.</param> /// <param name="source">The source.</param> /// <param name="schema">The schema.</param> /// <param name="operation">The operation.</param> /// <param name="fragments">The fragments.</param> /// <param name="variables">The variables.</param> /// <param name="cancellationToken">The cancellation token.</param> /// <param name="userContext">The user context.</param> public ResolveFieldContext( string fieldName, Field fieldAst, FieldType fieldDefinition, GraphType returnType, ObjectGraphType parentType, IReadOnlyDictionary<string, object> arguments, object rootValue, object source, ISchema schema, Operation operation, IEnumerable<IFragment> fragments, IEnumerable<Variable> variables, CancellationToken cancellationToken, object userContext) { FieldName = fieldName; FieldAst = fieldAst; FieldDefinition = fieldDefinition; ReturnType = returnType; ParentType = parentType; Arguments = arguments; RootValue = rootValue; Source = source; Schema = schema; Operation = operation; Fragments = fragments; Variables = variables; CancellationToken = cancellationToken; UserContext = userContext; }
/// <summary> /// Initializes a new instance of the <see cref="ExecutionContext"/> class. /// </summary> /// <param name="schema">The schema.</param> /// <param name="rootValue">The root value.</param> /// <param name="operation">The operation.</param> /// <param name="fragments">The fragments.</param> /// <param name="variables">The variables.</param> /// <param name="cancellationToken">The cancellation token.</param> /// <param name="userContext">The user context.</param> public ExecutionContext( ISchema schema, object rootValue, Operation operation, IEnumerable<IFragment> fragments, IEnumerable<Variable> variables, CancellationToken cancellationToken, object userContext) { Schema = schema; RootValue = rootValue; Operation = operation; Fragments = fragments ?? Enumerable.Empty<IFragment>(); Variables = variables ?? Enumerable.Empty<Variable>(); CancellationToken = cancellationToken; UserContext = userContext; }