Open kevincampanella opened 9 years ago
Currently using the "orderBy" composition option, you can sort on a property name only.
You can sort by property value - typo? For more complex ordering, you'll need to assign a precedence variable to each node on a case-by-case basis and, following this, order by said precedence variable.
I'm not sure how this could be effectively implemented in future releases of seraph-model. For now, I think your only option is to use a cypher query. There's an example here for custom ordering in neo4j.
It would be great to be able to specify a custom sort function for compositions. This could be used for things like sorting on relationship properties. Currently using the "orderBy" composition option, you can sort on a property name only. Please consider allowing the "orderBy" option to take a function to be used as the sort function. Suggest modifying sort-compositions.js, as follows: