Zodmint + Data: schema-valid generation meets collection querying #366
gonll
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Zodmint + Data: schema-valid generation meets collection querying
Hey everyone! The maintainer of Data reached out after seeing Zodmint, and it sparked a conversation worth sharing here.
What Zodmint does
Zodmint generates test fixtures that are guaranteed to pass
schema.safeParse(output).success === true. You hand it a Zod schema, it walks the type tree, resolves constraints, applies semantic field inference (a field namedemailgets a valid email, etc.), and returns a fully typedz.infer<typeof schema>value. No faker, no manual factories, no silent invalidity.How it pairs with Data
The two libraries sit at different layers and compose naturally:
Data manages the store and gives you the querying API. Zodmint seeds it with valid records. Neither steps on the other.
The interesting overlap
Handler generation is on the Data roadmap. Right now you still need to bring your own values when seeding collections, whether that's faker calls or hand-written objects. Zodmint could be an optional generation backend for that: pass a schema, get valid seeds automatically, skip the factory boilerplate entirely.
Curious if others are already pairing these two, and whether an official integration would be useful to the community.
Beta Was this translation helpful? Give feedback.
All reactions