@@ -22,13 +22,19 @@ public bool Equals(GraphQLResponse<T>? other) {
2222 if ( other == null ) { return false ; }
2323 if ( ReferenceEquals ( this , other ) ) { return true ; }
2424 if ( ! EqualityComparer < T > . Default . Equals ( this . Data , other . Data ) ) { return false ; }
25- {
26- if ( this . Errors != null && other . Errors != null ) {
27- if ( ! Enumerable . SequenceEqual ( this . Errors , other . Errors ) ) { return false ; }
28- }
29- else if ( this . Errors != null && other . Errors == null ) { return false ; }
30- else if ( this . Errors == null && other . Errors != null ) { return false ; }
25+
26+ if ( this . Errors != null && other . Errors != null ) {
27+ if ( ! Enumerable . SequenceEqual ( this . Errors , other . Errors ) ) { return false ; }
28+ }
29+ else if ( this . Errors != null && other . Errors == null ) { return false ; }
30+ else if ( this . Errors == null && other . Errors != null ) { return false ; }
31+
32+ if ( this . Extensions != null && other . Extensions != null ) {
33+ if ( ! Enumerable . SequenceEqual ( this . Extensions , other . Extensions ) ) { return false ; }
3134 }
35+ else if ( this . Extensions != null && other . Extensions == null ) { return false ; }
36+ else if ( this . Extensions == null && other . Extensions != null ) { return false ; }
37+
3238 return true ;
3339 }
3440
@@ -44,6 +50,15 @@ public override int GetHashCode() {
4450 else {
4551 hashCode = ( hashCode * 397 ) ^ 0 ;
4652 }
53+
54+ if ( this . Extensions != null ) {
55+ foreach ( var element in this . Extensions ) {
56+ hashCode = ( hashCode * 397 ) ^ EqualityComparer < KeyValuePair < string , object > > . Default . GetHashCode ( element ) ;
57+ }
58+ }
59+ else {
60+ hashCode = ( hashCode * 397 ) ^ 0 ;
61+ }
4762 }
4863 return hashCode ;
4964 }
0 commit comments