const MyJsonSchema = z.object({ prop: z.string(), prop2: z.number()})const JsonStringSchema = z.string().transform(v=>{ return MyJsonSchema.parse(JSON.parse(v));})
JsonStringSchema.parse(databaseObject.jsonStringField)
composite: true
tsconfig.json
import {useQuery} from '@tanstack/react-query';function usePostsQuery() { const client = api.useContext().client; return useQuery({queryFn: async ()=>{ return await client.posts.getPosts.mutate(); }})}