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

x/pothos/packages/plugin-validation/index.ts>PothosValidationPlugin

Pothos GraphQL is library for creating GraphQL schemas in typescript using a strongly typed code first approach
Go to Latest
class PothosValidationPlugin
extends BasePlugin<Types>
import { PothosValidationPlugin } from "https://deno.land/x/pothos@release-1690733553/packages/plugin-validation/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>