You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need the schemas not just for graphql inputs but also for graphql queries to be able to validate preloaded data from the database for a page. I can't just use withObjectType because it potentially contains more fields than the graphql query.
exportfunctionAuthorSchema(): z.ZodObject<Properties<Author>>{returnz.object({email: z.string(),name: z.string(),// this field I don't wantpassword: z.string()// this field I don't want})}
I need the schemas not just for graphql inputs but also for graphql queries to be able to validate preloaded data from the database for a page. I can't just use
withObjectType
because it potentially contains more fields than the graphql query.Example
GraphQL type:
My GraphQL query operation:
The zod schema I get:
Instead I need a schema like this:
The text was updated successfully, but these errors were encountered: