Vincit / objection-find

Build search queries for objection.js models using HTTP query parameters.
MIT License
102 stars 35 forks source link

Proposal: Remove special parameters #16

Closed afm-sayem closed 6 years ago

afm-sayem commented 6 years ago

Objection find is used as a 'WHERE' replacement in query parameters. But it also does pagination, sorting and eager loading. Implementing pagination, sorting and eager loading is trivial if someone is already using objection.js.

I propose we get rid of special parameters altogether.

afm-sayem commented 6 years ago

I think the earlier post was too short so I'll add a bit of an explanation. If you are using objection.js, it's trivially easy to add paginations, sorting and eager queries just by adding those queries in the promise chain. objection-find excels at providing a query dsl for filter queries, providing abstraction over already well-documented functions are unnecessary.

Projects that are of similar veins, like ghost query language or django-filter handle only the filtering part instead of trying to do paginations, sorting and others because those constructs are already solved by the underlying framework.

igor-savin-ht commented 6 years ago

I strongly disagree. Why would you want to remove useful functionality that works fine if you can simply not use it when you don't need it?