Slide 10
Slide 10 text
࣮
• طଘͷαϯϓϧΞϓϦͰ Retrofit ͕ΘΕ͍ͯͨͷͰ retrofit-graphql Ͱ࣮
• ϨϏϡʔΛ͓ئ͍ͨ͠Β Change Request ͕
val request = QueryContainerBuilder().putVariable("first", 10)
with(SampleApiService.getGraphQLInstance(getClient(this))) {
getAllFilms(request.apply { setOperationName("AllFilms") }).enqueue(cb)
getAllPeople(request.apply { setOperationName("AllPeople") }).enqueue(cb)
getAllPlanets(request.apply { setOperationName("AllPlanets") }).enqueue(cb)
getAllSpacies(request.apply { setOperationName("AllSpacies") }).enqueue(cb)
getAllStarships(request.apply { setOperationName("AllStarships") }).enqueue(cb)
getAllVehicles(request.apply { setOperationName("AllVehicles") }).enqueue(cb)
}