-
Notifications
You must be signed in to change notification settings - Fork 71
fix: SelectionSet
equality in 1.x
#771
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for apollo-ios-docc canceled.
|
✅ Docs preview readyThe preview is ready to be viewed. View the preview File Changes 0 new, 3 changed, 0 removed
Build ID: e22582b15ab6a851b4ea02c4 URL: https://www.apollographql.com/docs/deploy-preview/e22582b15ab6a851b4ea02c4 |
__data[key] | ||
} | ||
|
||
public static func == (lhs: MockSelectionSet, rhs: MockSelectionSet) -> Bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SelectionSet
now has it's own equality implementation.
52a7915
to
893a4f5
Compare
87a2466
to
ab8f785
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor unit test suggestion
This is related to apollographql/apollo-ios#3579 but targets a fix in the 1.0 branch.
An
Optional
type wrapped byAnyHashable
exhibits weird behaviour when checking equality of a non-optional type, eg:Swift
==Swift?
. The fix in 1.x is to recover the type data lost through usingAnyHashable
inDataDict
and then cast the field data as the field's concrete type for equality checks.