Side of desk project is to:
- wrap native fetch with Neverthrow
- provide nicer, Elm style return types
- abstract away decoding/enoding for JSON
- same, but for GraphQL + company’s rules around that
Learnings the past 3 days:
- Zod v3 to v4 has been a nightmare, so at first I just removed Zod and provided a decoder type interface instead b/c writing a Zod wrapper is like 1 line of code
- … but then I found out in v3.25.0 they name spaced the versions, making it easier for each to co-exist
- … so now I’m wondering if I should undo all my work of “abstracting away a Zod dependency
- but then I found out many are moving to Standard Schema and it’s not a too obtuse type to include, thus enabling me to be nice to ArkType and Effect-ts peoplez
- So now I think I can support Zod v4 internally, include an encoder interface for POST style operations, but still not exclude other schema libraries WHILE reserving the right to use Zod internally for various GraphQL schemas
- … but still requiring me to map those ZodErrors to my own type to not “leak Zod out”.
I really don’t like that last one. I may just not do it, install in a Zod v3 project, and “see what happens” in the unhappy paths.
Once done, I can wrangle the insane grossness that is Open Feature while dual-wielding Discriminated Unions of flame and frost brands.
Leave a Reply