Skip to content

index.TypeAlias.ValidatedArgs

github-actions[bot] edited this page Nov 30, 2026 · 10 revisions

Type Alias: ValidatedArgs<TSchema>

type ValidatedArgs<TSchema> = InferOutput<TSchema>;

Defined in: packages/graphql-casl/src/validateArgs.ts:129

The arguments type a resolver behind validateArgs(schema) receives: the schema's output type. Where the resolver's own signature is generated (a typescript-resolvers Resolvers type) it is already typed from the SDL, and this is the type to assert the parsed arguments to inside it.

Type Parameters

TSchema

TSchema extends StandardSchemaV1

Example

const CreateNoteArgs = z.object({ input: z.object({ title: z.string().trim().min(1) }) });
type Args = ValidatedArgs<typeof CreateNoteArgs>; // { input: { title: string } }

API Reference

Clone this wiki locally