Data representation of schema?
See original GitHub issueHey,
Given a Zod schema e.g.:
const a = z.object({
foo: z.string(),
})
Is there a way to get a plain data representation of this?
I am trying to map a Zod schema to a GraphQL schema (specifically an input object type).
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
What are database schemas? 5 minute guide with examples
A database schema is an abstract design that represents the storage of your data in a database. It describes both the organization of...
Read more >What is a Database Schema? - IBM
Schemas commonly use visual representations to communicate the architecture of the database, becoming the foundation for an organization's data ...
Read more >Database schema - Wikipedia
In a relational database, the schema defines the tables, fields, relationships, views, indexes, packages, procedures, functions, queues, triggers, types, ...
Read more >Chapter 8. Schema Representation
Each "significant" element of a database schema is represented in Theon as an individual file formatted as an XML-Schema document and referred to...
Read more >Separate data schema from data representation
In DOP, the expected shape is expressed as a data schema that is kept separated from the data itself. The main benefit of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @colinhacks @scotttrinh for the feedback here. Its great to get a deep (and timely!) answer like this!
Points seem reasonable and make sense 👍
@scotttrinh perhaps, I’ll check that out thanks!
IIUC
.shape
should give enough information to map the defined type/rules to another type system (of course within the bounds of what features overlap between Zod and the target system).