artsy / metaphysics

Artsy's GraphQL API
MIT License
360 stars 89 forks source link

feat: expose Gravity's viewingRoomsConnection to replace deprecated viewingRooms query #6030

Closed nickskalkin closed 1 day ago

nickskalkin commented 2 days ago

I've finally started working on viewing rooms un-stitching! One weird thing I've noticed is that there are "duplicates" of connection definitions coming from Gravity: ViewingRoomConnection and ViewingRoomEdge vs ViewingRoomsConnection and ViewingRoomsEdge (last two are plural). First two come from here and they are deprecated.

I want to simplify my life and instead of re-defining deprecated types on Metaphysics side - switch clients to use viewingRoomsConnection and kill old viewingRooms query. This PR exposes viewingRoomsConnection which was missing in Metaphysics before.

P.S. implementations of viewingRooms and viewingRoomsConnection seem almost identical, I've made a small change to sync them here: https://github.com/artsy/gravity/pull/18162

nickskalkin commented 1 day ago

Are there clients using viewingRooms?

@mzikherman yes, and unfortunately Eigen is one of them - we won't be able to remove viewingRooms from Gravity until the current app version which uses it is deprecated