Hi -

I'm using Sequel in an app that's servicing client requests written in 
GraphQL. The specifics aren't that important, the basic concept is that I'm 
dynamically generating eager-loading queries in response to client queries. 
For example, a query for users and their published posts will build a query 
that's the equivalent of: User.eager(posts: proc{|ds| ds.published}).all.

This has been working well so far, except that now I'm trying to support 
limits in these eager-loading queries and Sequel isn't really built for it. 
The eager limiting strategies would be nice but seem to only apply for 
cases where the :limit option is passed to the association declaration, 
which unfortunately won't work for me because I need these limits to be 
dynamic.

I'm happy to put together a patch for Sequel to support this, but before I 
do I wanted to get a sense of whether it'd be considered useful enough to 
be merged into master, or if there are problems with supporting this that 
I'm not seeing. The goal would be for a query like User.eager(posts: 
proc{|ds| ds.published.limit(5)}) to use the same eager limiting strategy 
that would be used if the User -> Posts association had been declared with 
a limit of 5.

Thanks!
Chris

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to