Created
April 6, 2019 12:24
-
-
Save Lavanyagaur22/d1aa788bd17145c0c6305c9d34c99d46 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
private fun createtask(title: String, description: String) { | |
Log.e(TAG, "inside create task") | |
val client = Utils.getApolloClient(this)?.mutate( | |
CreateTask.builder().title(title).description(description).build() | |
) | |
client?.enqueue(object : ApolloCall.Callback<CreateTask.Data>() { | |
override fun onFailure(e: ApolloException) { | |
Log.e("onFailure" + "createTask", e.toString()) | |
} | |
override fun onResponse(response: Response<CreateTask.Data>) { | |
val result = response.data()?.createTask() | |
Log.e(TAG, "${result?.id()}") | |
Log.e(TAG, "${result?.title()}") | |
Log.e(TAG, "${result?.description()}") | |
Log.e(TAG, "${result?.version()}") | |
} | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment