Skip to content

index.Interface.ValidateGraphQLRulesOptions

github-actions[bot] edited this page Sep 4, 2026 · 14 revisions

Interface: ValidateGraphQLRulesOptions

Defined in: packages/graphql-casl/src/validateGraphQLRules.ts:30

Options for validateGraphQLRules.

Properties

conditionFields?

readonly optional conditionFields?: "schema" | "none";

Defined in: packages/graphql-casl/src/validateGraphQLRules.ts:44

Whether a condition's field names are checked against the subject type.

'schema' (the default) requires every path in conditions to name a field of the subject — and, for a dotted path, a field of each type along the way. 'none' checks only the shape of the conditions (the operators, $and/$or/$nor groups) and lets any field name through.

Use 'none' when subjects are database models rather than GraphQL types — codegen mappers, say — and a rule legitimately conditions on a column the schema does not expose. Subject and fields names are always checked; those are schema names.

API Reference

Clone this wiki locally