Filter logic at different query depths

So here is where I am headed with this concept of user definable multi-level filter logic. Just interested in feedback.

  1. UI provides logic to build filters for predefined fields and save these filters in the database for the user.
  2. User can then make a request to use a set of filters with conjunction logic.
  3. I am writing a @custom script with a lambda function to accept variables with tells the script which filters to use.
  4. Then it makes a request back to dgraph to get those filter values.
  5. From these filter values it actually generate a DQL (or whatever we are calling it now) and
  6. Then sends that to dgrqph to
  7. Return a list of uids that fully appease the filters.
  8. These uids are returned to the UI and then
  9. Used to get the actual data to display and paginate.

This solves a few problems.

  • Paginating with cascade
  • Many queries required for deep nested logic conjucted together.