Skip to content

Commit

Permalink
Merge pull request #185 from graphql-dotnet/develop
Browse files Browse the repository at this point in the history
fix stack overflow in equality comparer
  • Loading branch information
rose-a authored Mar 9, 2020
2 parents b5750ed + a727000 commit abf006d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/GraphQL.Primitives/GraphQLRequest.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;

namespace GraphQL {
Expand Down Expand Up @@ -64,7 +65,7 @@ public override bool Equals(object? obj) {
public virtual bool Equals(GraphQLRequest? other) {
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
return EqualityComparer<Dictionary<string,object>>.Default.Equals(this, other);
return this.Count == other.Count && !this.Except(other).Any();
}

/// <summary>
Expand Down

0 comments on commit abf006d

Please sign in to comment.