toApolloResponse

fun <D : Operation.Data> JsonReader.toApolloResponse(operation: Operation<D>, requestUuid: Uuid? = null, customScalarAdapters: CustomScalarAdapters = CustomScalarAdapters.Empty, deferredFragmentIdentifiers: Set<DeferredFragmentIdentifier>? = null): ApolloResponse<D>

Reads a single ApolloResponse from this. Returns an error response if this contains more than one JSON response or trailing tokens. toApolloResponse takes ownership and closes this.

Return

the parsed ApolloResponse

See also