Eamonn
11/30/2021, 3:35 PMBook.search(ids.flatten()), and the resulting list is then filtered for only those that match that same set of ids allBooks.filter { idSet.contains(it.id) } . Is that filter not superfluous? Thanks, Eamonn https://github.com/ExpediaGroup/graphql-kotlin/blob/master/examples/server/ktor-se[…]aphql/examples/server/ktor/schema/dataloaders/BookDataLoader.ktShane Myrick
11/30/2021, 8:22 PMList<Int> for the ids mapped to a List<Book> so that is why we have the double filter there to group the ids by all books so we only have to call books.search once
I suppose what we could actually do is map every id to call the Books.search function instead, but this is just a basic example