From b8e3dfdc240eacc95cb725b56ba35ab0c4e2294a Mon Sep 17 00:00:00 2001 From: Zach FettersMoore <4425109+BobaFetters@users.noreply.github.com> Date: Tue, 2 Jul 2024 00:38:07 -0400 Subject: [PATCH] Adding debugDescription to SelectionSets - Adding debugDescription through CustomDebugStringConvertible to SelectionSets --- apollo-ios/Sources/ApolloAPI/SelectionSet.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apollo-ios/Sources/ApolloAPI/SelectionSet.swift b/apollo-ios/Sources/ApolloAPI/SelectionSet.swift index f017bf113..77a7276db 100644 --- a/apollo-ios/Sources/ApolloAPI/SelectionSet.swift +++ b/apollo-ios/Sources/ApolloAPI/SelectionSet.swift @@ -46,7 +46,7 @@ public protocol CompositeInlineFragment: CompositeSelectionSet, InlineFragment { } // MARK: - SelectionSet -public protocol SelectionSet: Hashable { +public protocol SelectionSet: Hashable, CustomDebugStringConvertible { associatedtype Schema: SchemaMetadata /// A type representing all of the fragments the `SelectionSet` can be converted to. @@ -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)" + } } extension SelectionSet where Fragments: FragmentContainer {