AE
Ash Elixir•2y ago
zorn

Is the structure from the auto-generated graph filters from some spec?

Interesting to observe that by default Ash will generate me a whole tree of options to filter and sort a list inside a graph query. I'm still kind of new to graph. Is this design/structure specific to any single frontend library like Rely or Apollo?
No description
4 Replies
zorn
zornOP•2y ago
Additionally, one question I have is about the choice to generate an isNil. I would have expected that name to be isNull to better match the JSON value representation. Related, after posting, I saw the relay? option to the list DSL which helps explain some intent to me. https://ash-hq.org/docs/dsl/ash-resource#graphql-queries-list-relay-
ZachDaniel
ZachDaniel•2y ago
it is not from a spec, it is essentially custom to Ash. Good point about isNil, to change it to isNull we'd need to make a breaking change and/or allow users to customize it in some way though
zorn
zornOP•2y ago
Thanks for the background. isNil is low impact point of feedback for me so I wouldn't spend a ton of energy on it unless it comes up again. The other part of it that felt a bit off was to see a bunch of generated greaterThan for say my enum attribute. Time will tell if I use the generated filters/sort or handcraft my own. I think having some default generated option is great though.
ZachDaniel
ZachDaniel•2y ago
greaterThan is a bit weird, yes 🙂 And its alphabetical I think as well There is an option to remove the auto generated filters too

Did you find this page helpful?