@@ -19,17 +19,18 @@ spago install justifill
1919Version 0.8 exposes optional query parameters as explicit `Maybe` fields. Calls that passed plain values no longer compile:
2020
2121```purescript
22−-- 0.7
23−users <- api.listUsers { limit: 10, offset: 0 }
22+-- 0.7: offset omitted
23+users <- api.listUsers { limit: 10 }
2424
25−-- 0.8
26−users <- api.listUsers { limit: Just 10, offset: Just 0 }
25+-- 0.8: every optional field is explicit
26+users <- api.listUsers { limit: Just 10, offset: Nothing }
2727allUsers <- api.listUsers { limit: Nothing, offset: Nothing }
2828```
2929
3030Import `Maybe(..)` from `Data.Maybe` when constructing these records directly. Alternatively, [`justifill`](https://pursuit.purescript.org/packages/purescript-justifill) wraps supplied values in `Just` and fills omitted fields with `Nothing`:
3131
3232```purescript
33+-- offset remains omitted at the call site
3334users <- api.listUsers (justifill { limit: 10 })
3435```
3536