Skip to content

Commit e6e63b3

Browse files
committed
debugging
1 parent ec6ca05 commit e6e63b3

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

apollo-ios/Sources/ApolloAPI/SelectionSet+Equatable.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,6 @@ public extension SelectionSet {
1515
/// that are relevant to the `SelectionSet`. This ensures that equality checks for a fragment do not
1616
/// consider fields that are not included in the fragment, even if they are present in the data.
1717
static func ==(lhs: Self, rhs: Self) -> Bool {
18-
if String(describing: self) == "FriendsConnection" {
19-
print("""
20-
SelectionSet::==
21-
lhs: \(lhs.fieldsForEquality())
22-
rhs: \(rhs.fieldsForEquality())
23-
""")
24-
}
25-
2618
return Self.equatableCheck(
2719
lhs.fieldsForEquality(),
2820
rhs.fieldsForEquality()
@@ -50,7 +42,15 @@ public extension SelectionSet {
5042
_ lhs: T,
5143
_ rhs: any Hashable
5244
) -> Bool {
53-
lhs == rhs as? T
45+
if String(describing: self) == "FriendsConnection" && (lhs != rhs as? T) {
46+
print("""
47+
equatableCheck failure:
48+
lhs: \(lhs)
49+
rhs: \(rhs), as? T: \(rhs as? T)
50+
""")
51+
}
52+
53+
return lhs == rhs as? T
5454
}
5555

5656
private func fieldsForEquality() -> [String: FieldValue] {

0 commit comments

Comments
 (0)