decodeResponse

abstract fun <T : Any> decodeResponse(body: String, responseType: Type): T(source)

Deserializes a raw GraphQL response body into T.

Return

The deserialized response.

Parameters

body

The raw response body string.

responseType

The complete Type of the expected response, including generic arguments (for example GraphQLResponse<GetUserData>).

Throws

when deserialization fails.