absinthe-graphql / absinthe_ecto

DEPRECATED: Use dataloader
MIT License
130 stars 36 forks source link

Using absinthe_ecto with absinthe_relay #17

Closed tslater closed 4 years ago

tslater commented 7 years ago

Is there a way to use this with absinthe_relay? Specifically, how would assoc and Absinthe.Relay.Connection work together?

benwilson512 commented 7 years ago

At the moment there is not support for this. The blocker has to do the fact that batching connections requires either window functions or lateral joins, neither of which are well supported by Ecto. It isn't clear how I would autogenerate the correct query with the tools ecto gives me.

I've said elsewhere and I'll say it again here, the moment anyone is able to show me how to do the requisite ecto bit I'll hook it up into Absinthe.Ecto.

tslater commented 7 years ago

I'll do some more looking on that. On a barely related note, MariaDB added window functions: https://mariadb.com/kb/en/mariadb/what-is-mariadb-102/

benwilson512 commented 7 years ago

Nice! Might be worth looking further at what ecto support for such a feature would look like.

sanderhahn commented 6 years ago

Preview support for Ecto windows functions is available at: https://github.com/hauleth/ecto_olap/blob/window-functions/lib/window.ex

benwilson512 commented 6 years ago

Awesome! Anyone have an example of how this would work with limit?