Skip to content

Conversation

calvincestari
Copy link
Member

This is related to apollographql/apollo-ios#3579 but targets a fix in the 1.0 branch.

An Optional type wrapped by AnyHashable 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 using AnyHashable in DataDict and then cast the field data as the field's concrete type for equality checks.

Copy link

netlify bot commented Sep 24, 2025

Deploy Preview for apollo-ios-docc canceled.

Name Link
🔨 Latest commit c3d36ac
🔍 Latest deploy log https://app.netlify.com/projects/apollo-ios-docc/deploys/68dd76ccaf4e40000885d32f

@apollo-librarian
Copy link

apollo-librarian bot commented Sep 24, 2025

✅ Docs preview ready

The preview is ready to be viewed. View the preview

File Changes

0 new, 3 changed, 0 removed
* (developer-tools)/ios/v1/client-directives.mdx
* (developer-tools)/ios/v1/caching/cache-key-resolution.mdx
* (developer-tools)/ios/v1/caching/programmatic-cache-keys.mdx

Build ID: 5ac3c328241afa1fa74f1fc2
Build Logs: View logs

URL: https://www.apollographql.com/docs/deploy-preview/5ac3c328241afa1fa74f1fc2

@calvincestari calvincestari marked this pull request as draft September 25, 2025 20:04
@calvincestari calvincestari marked this pull request as ready for review September 29, 2025 21:44
__data[key]
}

public static func == (lhs: MockSelectionSet, rhs: MockSelectionSet) -> Bool {
Copy link
Member Author

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.

@calvincestari calvincestari changed the base branch from main to v1 October 1, 2025 19:41
@calvincestari calvincestari force-pushed the fix/v1-equality-check branch from 52a7915 to 893a4f5 Compare October 1, 2025 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant