public static void CompleteValue( this CompleteValueContext context, ResolverTask resolverTask) { if (context == null) { throw new ArgumentNullException(nameof(context)); } context.ResolverTask = resolverTask; ValueCompletion.CompleteValue( context, resolverTask.FieldType, resolverTask.ResolverResult); if (context.IsViolatingNonNullType) { resolverTask.PropagateNonNullViolation(); } else { resolverTask.SetResult(context.Value); } }
public void PropagateNonNullViolation() { if (FieldSelection.Field.Type.IsNonNullType()) { if (_propagateNonNullViolation != null) { _propagateNonNullViolation.Invoke(); } else if (_parent != null) { _parent.PropagateNonNullViolation(); } } SetResult(null); }