Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/pothos/packages/plugin-zod/index.ts>PothosZodPlugin

Pothos GraphQL is library for creating GraphQL schemas in typescript using a strongly typed code first approach
Go to Latest
class PothosZodPlugin
extends BasePlugin<Types>
import { PothosZodPlugin } from "https://deno.land/x/pothos@release-1725301526/packages/plugin-zod/index.ts";

Properties

inputFieldValidators: Map<string, Record<string, zod.ZodType<unknown>>>

Methods

createValidator(
optionsOrConstraint: RefineConstraint | ValidationOptionUnion | undefined,
fieldName: string,
): zod.ZodTypeAny
wrapResolve(resolver: GraphQLFieldResolver<unknown, Types["Context"], object>, fieldConfig: PothosOutputFieldConfig<Types>): GraphQLFieldResolver<unknown, Types["Context"], object>