Skip to content

Commit 15f1045

Browse files
committed
fix GraphQLRequest.GetHastCode()
1 parent 2dd397d commit 15f1045

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/GraphQL.Primitives/GraphQLRequest.cs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,7 @@ public virtual bool Equals(GraphQLRequest? other)
8484
/// <summary>
8585
/// <inheritdoc cref="object.GetHashCode"/>
8686
/// </summary>
87-
public override int GetHashCode()
88-
{
89-
unchecked
90-
{
91-
var hashCode = Query?.GetHashCode() ?? 0;
92-
hashCode = (hashCode * 397) ^ OperationName?.GetHashCode() ?? 0;
93-
hashCode = (hashCode * 397) ^ Variables?.GetHashCode() ?? 0;
94-
return hashCode;
95-
}
96-
}
87+
public override int GetHashCode() => (Query, OperationName, Variables).GetHashCode();
9788

9889
/// <summary>
9990
/// Tests whether two specified <see cref="GraphQLRequest"/> instances are equivalent

0 commit comments

Comments
 (0)