Graphql get direct requested model
I implemented a sample of Graphql by Retrofit. I have a response like this:
if (response.isSuccessful) {
Log.e("response", response.body().toString())
Also, this is my interface class:
suspend fun postDynamicQuery(@Body body: String): Response
Now I want to change my method by giving a direct model. this is the servers' answer.
{
"data": {
"getCityByName": {
"id": "112931",
"name": "Tehran",
"country": "IR",
"coord": {...