edgedb-zod
edgedb-zod copied to clipboard
Some ideas
Just some miscellaneous ideas!
- Perhaps call the two schemas something like
Read
andWrite
. The "Create" and "Update" aren't quite right since computed properties can't be included in aninsert
call. - I'd include the EdgeDB SDL in the README as well so users can see directly see the correspondence between the EdgeDB and Zod types.
- Why not make
datetime
correspond toDate
? That's what the client library would expect. I'd also recommend usingz.instance(edgedb.LocalDate)
,z.instance(edgedb.LocalTime)
, etc for the various datatypes that correspond to custom classes. (The generated file can just haveimport * as edgedb from "edgedb"
at the top.)
Docs
- Perhaps explain the rational behind why links are excluded
- Include installation instructions
- "To run the CLI: edgedb-zod [options]" — this should probably be
npx edgedb-zod
- I recommend switching to red and green dots (🔴🟢) to make the comparison table a little more uniform. And expand "Most scalars" so there's more green dots :)
- Maybe choose a simpler regex so the generated code is a bit less scary?