Skip to content
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

Adding debugDescription to SelectionSets #412

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

BobaFetters
Copy link
Member

  • Adding debugDescription through CustomDebugStringConvertible to SelectionSet

Closes apollographql/apollo-ios#3374

- Adding debugDescription through CustomDebugStringConvertible to SelectionSets
Copy link

netlify bot commented Jul 2, 2024

Deploy Preview for apollo-ios-docc canceled.

Name Link
🔨 Latest commit b8e3dfd
🔍 Latest deploy log https://app.netlify.com/sites/apollo-ios-docc/deploys/668384737ecdb20008bcb8e6

Copy link

netlify bot commented Jul 2, 2024

Deploy Preview for eclectic-pie-88a2ba canceled.

Name Link
🔨 Latest commit b8e3dfd
🔍 Latest deploy log https://app.netlify.com/sites/eclectic-pie-88a2ba/deploys/668384734f1d49000841a87f

@@ -117,6 +117,10 @@ extension SelectionSet {
@inlinable public static func ==(lhs: Self, rhs: Self) -> Bool {
return lhs.__data == rhs.__data
}

public var debugDescription: String {
return "\(self.__data._data as AnyObject)"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this print more than the data inside the DataDict, like the fulfilledFragments etc? And are we good with a readable format like provided by casting to AnyObject like the screenshot or do we want to manually create an output from keys/values?

Screenshot 2024-07-02 at 12 37 25 AM

Copy link
Member

@calvincestari calvincestari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this satisfies what was requested in the issue. The other properties of a DataDict probably don't need to be output, we can adjust later if needed.

@BobaFetters BobaFetters merged commit 434ef29 into main Jul 2, 2024
26 checks passed
@BobaFetters BobaFetters deleted the feature/debug-description branch July 2, 2024 20:39
BobaFetters added a commit to apollographql/apollo-ios that referenced this pull request Jul 2, 2024
BobaFetters pushed a commit that referenced this pull request Jul 2, 2024
fe326385 Adding debugDescription to SelectionSets (#412)

git-subtree-dir: apollo-ios
git-subtree-split: fe32638504379a4855d63141e62b30c10684c218
BobaFetters pushed a commit that referenced this pull request Jul 2, 2024
git-subtree-dir: apollo-ios
git-subtree-mainline: 0df6da0
git-subtree-split: fe32638504379a4855d63141e62b30c10684c218
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.

Add debugDescription api for Apollo generated types
2 participants