Skip to content

Commit

Permalink
Fixed the mutation result handling in the resolver pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelstaib committed Sep 21, 2022
1 parent 53aef6e commit 2b54ffc
Show file tree
Hide file tree
Showing 5 changed files with 180 additions and 59 deletions.
12 changes: 11 additions & 1 deletion src/HotChocolate/Core/src/Abstractions/IMutationResult.cs
@@ -1,3 +1,5 @@
using System.Diagnostics.CodeAnalysis;

namespace HotChocolate;

/// <summary>
Expand All @@ -8,10 +10,18 @@ public interface IMutationResult
/// <summary>
/// Gets the mutation result value.
/// </summary>
object Value { get; }
object? Value { get; }

/// <summary>
/// Defines if the mutation was successful and if the result represents a success result.
/// </summary>
bool IsSuccess { get; }

/// <summary>
/// Defines if the mutation had an error and if the result represents a error result.
/// </summary>
#if NET5_0_OR_GREATER
[MemberNotNullWhen(true, nameof(Value))]
#endif
bool IsError { get; }
}

0 comments on commit 2b54ffc

Please sign in to comment.