Module
Prospero.Validation
- Package
- purescript-prospero
- Repository
- rowtype-yoga/purescript-prospero
#validate Source
validate :: Array ValidationRule -> Array Selection -> GqlType -> Array GraphQLErrorRun all validation rules, returning GraphQL errors
#validateDepth Source
validateDepth :: Int -> ValidationRuleValidate that query depth does not exceed a maximum
#validateFieldCount Source
validateFieldCount :: Int -> ValidationRuleValidate total number of fields does not exceed a maximum
#validateComplexity Source
validateComplexity :: Int -> ValidationRuleValidate query complexity with a simple cost model (each field = 1, each list multiplier = 10)
#ValidationRule Source
type ValidationRule = Array Selection -> GqlType -> Array ValidationError#SelectionMetrics Source
type SelectionMetrics = { cost :: Int, depth :: Int, fieldCount :: Int }Metrics computed in a single pass over the selection tree
#analyzeSelections Source
analyzeSelections :: GqlType -> Array Selection -> SelectionMetricsCompute depth, field count, and cost in a single traversal
- Modules
- Dev.
Client - Dev.
Schema - Dev.
Server - Prospero
- Prospero.
Bun - Prospero.
CacheControl - Prospero.
Client - Prospero.
Client. GqlUnion - Prospero.
Client. WebSocket - Prospero.
Codegen - Prospero.
Codegen. Main - Prospero.
Crypto - Prospero.
DataLoader - Prospero.
Defer - Prospero.
Directive - Prospero.
Execution - Prospero.
Fastify - Prospero.
Federation - Prospero.
GqlQuery - Prospero.
GqlTypes - Prospero.
GraphQLError - Prospero.
GraphQLWS - Prospero.
Http - Prospero.
InputValue - Prospero.
Introspection - Prospero.
Metadata - Prospero.
Om - Prospero.
Parser - Prospero.
Parser. AST - Prospero.
Parser. GraphQL - Prospero.
Parser. Lexer - Prospero.
Parser. Monad - Prospero.
Parser. Token - Prospero.
PersistedQueries - Prospero.
Relay - Prospero.
ResponseValue - Prospero.
RootResolver - Prospero.
SDL - Prospero.
Scalars - Prospero.
Schema - Prospero.
SchemaTransform - Prospero.
Step - Prospero.
Subscription - Prospero.
Tracing - Prospero.
Types - Prospero.
Upload - Prospero.
Validation - Prospero.
VariantHelper - Prospero.
WebSocket - Prospero.
Wrapper