farmOS / farmOS.js

A JavaScript library for working with farmOS data structures and interacting with farmOS servers.
MIT License
15 stars 13 forks source link

Add `$in` and `$nin` as filter operators #33

Closed jgaehring closed 2 years ago

jgaehring commented 3 years ago

These operators are already incorporated into Field Kit's parseFilter() function, and they're supported by the Drupal's JSON:API module, so I should definitely try to add them here:

https://github.com/farmOS/farmOS.js/blob/9e2dc24ca8f24f65415301c23cee8546e40479fa/src/connect/parseFilter.js#L18-L30

I think this should be pretty straight-forward, but I don't want to dive into this now and find it's more complex than I assumed, and it should be a blocker for FK v2-alpha. At this point, I want to get that alpha out before putting the final touches on farmOS.js v2-beta, so hopefully I can circle back to this then.

jgaehring commented 3 years ago

Note this example from Drupal's JSON:API docs: https://www.drupal.org/docs/core-modules-and-themes/core-modules/jsonapi-module/filtering#s-4-filtering-with-arrays-get-nodes-created-by-users-admin-john