Hello. I am trying to figure out how to execute my query and just checking if it logs. I try to run it but it’s not logging anything. I tried putting it in my MainActivity,kt but it does not work. I am using Android Studio and I am developing an Android App. Please help me I am very new to kotlin and coding
Hi that sounds about right. Maybe try catching any exception to see if something wrong happened?
try {
val response = apolloClient.query(GetRoutesQuery()).execute()
Log.d("LaunchList", "Success ${response.data}")
} catch (e: Exception) {
Log.d("LaunchList", "oops", e)
}
Hello, thank you for responding.
I figured out why the Logcat was not displaying any logs; it was because I was using BlueStacks as my emulator. Unfortunately, there are still no signs of query being executed.
Your LaunchList()
symbol is grayed out up there. Maybe make sure you’re calling it from another @Composable function?