validate library

Classes

ValidaAttachment
A GraphQL attachment which specifies a valida annotation in a GraphQLElement for validating input and outputs. Presented as a directive directiveDefinition in the GraphQL schema.

Constants

specifiedRules → const List<ValidationRule>
Default validation rules from the GraphQL specification
specifiedSDLRules → const List<SDLValidationRule>
Default schema validation rules from the GraphQL specification

Properties

validaGraphQLDirective GraphQLDirective
The validation performed in a type, field or argument definition
final

Functions

validateDocument(GraphQLSchema schema, DocumentNode document, {int maxErrors = 100, List<ValidationRule> rules = specifiedRules}) List<GraphQLError>
Executes the default GraphQL validations for the given document over the schema.
validateSDL(DocumentNode document, {GraphQLSchema? schemaToExtend, List<SDLValidationRule> rules = specifiedSDLRules}) List<GraphQLError>
Executes GraphQL schema validations for the given document with an optional base schemaToExtend.
validationFromName(String name) ValidationRule?
Returns the provided ValidationRule with the given name, if any

Typedefs

SDLValidationRule = Visitor Function(SDLValidationCtx)
Return a visitor that executes schema document validations for a SDLValidationCtx
ValidationRule = Visitor Function(ValidationCtx)
Return a visitor that executes document validations for a ValidationCtx