kesne / HostyHosting

A platform to easily manage and deploy your applications.
https://www.hostyhosting.com/
Other
92 stars 16 forks source link

Thoughts about Pagination #101

Open kesne opened 4 years ago

kesne commented 4 years ago

Relay pagination and connections entirely assume that you always want infinite-loading lists. This makes a lot of sense for Facebook, where you almost always want an infinite-loading list. However, for HostyHosting, we almost always want page-based lists.

Given this, I don't think it makes sense to leverage getPaginationFragment(), as it would just require us to customize a shitton of internals, for seemingly tiny gain (the main gain would really just be the ability to call loadNext(count), which is really small).

GIVEN THIS, does it make sense to use getRefetchableFragment()?? We can always just hoist the state into the parent, use queries, and probably get the good UI using transitions.

This would dramatically simplify the backend, because we would avoid @connections entirely, and would avoid having to implement node and nodes, etc. etc. etc.