mapData

inline fun <T, R> GraphContainer<T>.mapData(transform: (T) -> R): R?(source)

Deprecated

Legacy helper of the GraphContainer flow. Use GraphQLData with the backend-neutral GraphQLResponse contract instead.

Transforms GraphContainer.data with transform if present, or returns null.

Legacy: part of the deprecated GraphContainer flow in :compat.

Return

The transformed value, or null when data is null.

Parameters

transform

A mapping function applied to non-null data.