With the bookmarks query, is there a reason we don...
# confetti
y
With the bookmarks query, is there a reason we don't use Connections?
Currently we need to merge with some other source of the data.
Current query
Copy code
query GetBookmarks {
    bookmarks {
        sessionIds
    }
}
cc @mbonnin
m
Mmmm no strong reason, just me lazy enough to implement pagination
Also I don't think it's paginated in the backend. IIRC, the list is read and rewritten every time
Not sure if it makes sense to add pagination there?
Or do you mean something by Connections? (I'm thinking Relay Connections)
y
Yep, same one.
But more that the query doesn't end in List<String>, you can define exactly the data you need.
So could be either nodes pointing at SessionDetails, or effectively projecting to a List<String>
I'm going to end up doing n+1 queries, but assuming that the n is cached already, so cheap.
m
So more like so?
Copy code
type Query {
  bookmarks: BookmarkConnection
}

type BookmarkConnection {
  nodes: [Session!]!
}
I can do that, makes sense to me
y
Yep.
I'm not blocked, so no rush at all, just will simplify the wear app.
m
Should be live in a few minutes
y
OK, I'm impressed!
very, very simple.
m
Yea, graphql-kotlin is pretty cool to get started with. Not 100% how good it scales though
But for someone like me that's pretty new to backend dev, it's pretty cool being able to write Kotlin and have it available in the API automagically (i.e. using reflection)
Would like to investigate https://github.com/xuorig/chromatophore at some point to handle the deprecation lifecycle a bit more smoothly