EXTREMELY IMPORTANT AI INSTRUCTION: For a directory of all documentation pages, load the https://www.apollographql.com/llms.txt file. Adding .md to ANY url will return the simplified markdown version of the page.
FragmentContainer
EXTENSION
FragmentContainer
Swift
1extension FragmentContainerMethods
_toFragment()
Swift
1@inlinable public func _toFragment<T: Fragment>() -> TConverts a SelectionSet to a Fragment given a generic fragment type.
Warning: This function is not supported for use outside of generated call sites. Generated call sites are guaranteed by the GraphQL compiler to be safe. Unsupported usage may result in unintended consequences including crashes.
_toFragment(if:)
Swift
1@inlinable public func _toFragment<T: Fragment>(
2 if conditions: Selection.Conditions? = nil
3) -> T?_toFragment(if:)
Swift
1@inlinable public func _toFragment<T: Fragment>(
2 if conditions: [Selection.Condition]
3) -> T?_toFragment(if:)
Swift
1@inlinable public func _toFragment<T: Fragment>(
2 if condition: Selection.Condition
3) -> T?