We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d1abc5 commit 51dbdbdCopy full SHA for 51dbdbd
apollo-ios/Sources/ApolloAPI/SelectionSet.swift
@@ -128,8 +128,16 @@ extension SelectionSet where Fragments: FragmentContainer {
128
public var fragments: Fragments { Fragments(_dataDict: __data) }
129
}
130
131
+// MARK: - Root Entity Type Conversion Helpers
132
+
133
extension InlineFragment {
134
@inlinable public var asRootEntityType: RootEntityType {
135
RootEntityType.init(_dataDict: __data)
136
137
138
139
+extension RootSelectionSet {
140
+ public init<T: InlineFragment>(_ inlineFragment: T) where T.RootEntityType == Self {
141
+ self = inlineFragment.asRootEntityType
142
+ }
143
+}
0 commit comments