Skip to content

Commit

Permalink
Adding debugDescription to SelectionSets (apollographql/apollo-ios-de…
Browse files Browse the repository at this point in the history
  • Loading branch information
BobaFetters authored and gh-action-runner committed Jul 2, 2024
1 parent aa8db7c commit fe32638
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Sources/ApolloAPI/SelectionSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit fe32638

Please sign in to comment.