Created
June 12, 2019 10:29
-
-
Save Lavanyagaur22/bc8cb892c2bd6ab1d94c19523e78d95d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// AllTasksQuery.builder()?.build()?.let { | |
// Utils?.getApolloClient(this)?.query(it) | |
// ?.responseFetcher(ApolloResponseFetchers.CACHE_FIRST) | |
// ?.enqueue(object : ApolloCall.Callback<AllTasksQuery.Data>() { | |
// override fun onFailure(e: ApolloException) { | |
// e.printStackTrace() | |
// Log.e(TAG, "----$e ") | |
// } | |
// | |
// override fun onResponse(response: Response<AllTasksQuery.Data>) { | |
// | |
// watchResponse.set(response) | |
// | |
// Log.e(TAG, "on Response : Watcher ${response.data()}") | |
// | |
// | |
// val result = response.data()?.allTasks() | |
// Log.e( | |
// TAG, | |
// "onResponse-getTasks : ${result?.get(result.size - 1)?.title()} ${result?.get(result.size - 1)?.version()}" | |
// ) | |
// | |
// result?.forEach { | |
// val title = it.title() | |
// val desc = it.description() | |
// val id = it.id() | |
// val version: Int? = it.version() | |
// val task = Task(title, desc, id.toInt(), version!!) | |
// noteslist.add(task) | |
// } | |
// runOnUiThread { | |
// Log.e(TAG, " Size ${noteslist.size}") | |
// taskAdapter.notifyDataSetChanged() | |
// } | |
// } | |
// }) | |
// } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment