@gqloom/zod
v0.6.1
Published
Create GraphQL schema and resolvers easily using using Zod!
Downloads
250
Maintainers
Readme
GQLoom
GQLoom is a GraphQL weaver for TypeScript/JavaScript that weaves GraphQL Schema using Valibot, Zod, or Yup, and supports sophisticated type inference to provide the best development experience.
@gqloom/zod
This package provides GQLoom integration with Zod to weave Zod Schema to GraphQL Schema.
Hello World
import { resolver, query, ZodWeaver } from "@gqloom/zod"
import { zod } from "zod"
const helloResolver = resolver({
hello: query(z.string(), () => "world"),
})
export const schema = ZodWeaver.weave(helloResolver)
Read more at GQLoom Document.