When working with something like GraphQL, you’re often confronted with nested structures with lots of optionals (and Js.Nullable.t). I’m interested in how you typically deal with those types of structures in an ergonomic way. I thought we could gather the alternatives here.
In JS it’s easy enough with optional chaining, and I believe there’s a similar ppx in Reason, right?
One alternative is also to just use switch + Js.Nullable.toOption manually. This becomes quite messy quick though.
So, how are you doing it?