sangria.validation.rules

Members list

Type members

Classlikes

case class ConflictReason(fieldName: String, reason: Either[String, Vector[ConflictReason]])

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Executable definitions

Executable definitions

A GraphQL document is only valid for execution if all definitions are either operation or fragment definitions.

Attributes

Supertypes
class Object
trait Matchable
class Any

Fields on correct type

Fields on correct type

A GraphQL document is only valid if all fields selected are defined by the parent type, or are an allowed meta field such as __typename

Attributes

Supertypes
class Object
trait Matchable
class Any

Fragments on composite type

Fragments on composite type

Fragments use a type condition to determine if they apply, since fragments can only be spread into a composite type (object, interface, or union), the type condition must also be a composite type.

Attributes

Supertypes
class Object
trait Matchable
class Any

All inferred variables within input document should not conflict in it's inferred type

All inferred variables within input document should not conflict in it's inferred type

Attributes

Supertypes
class Object
trait Matchable
class Any

Known argument names

Known argument names

A GraphQL field is only valid if all supplied arguments are defined by that field.

Attributes

Supertypes
class Object
trait Matchable
class Any

Known directives

Known directives

A GraphQL document is only valid if all @directives are known by the schema and legally positioned.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type

Known fragment names

Known fragment names

A GraphQL document is only valid if all ...Fragment fragment spreads refer to fragments defined in the same document.

Attributes

Supertypes
class Object
trait Matchable
class Any
class KnownTypeNames(suggestion: SuggestionFunction) extends ValidationRule

Known type names

Known type names

A GraphQL document is only valid if referenced types (specifically variable definitions and fragment conditions) are defined by the type schema.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type

Lone anonymous operation

Lone anonymous operation

A GraphQL document is only valid if when it contains an anonymous operation (the query short-hand) that it contains only that one operation definition.

Attributes

Supertypes
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any

No undefined variables

No undefined variables

A GraphQL operation is only valid if all variables encountered, both directly and via fragment spreads, are defined by that operation.

Attributes

Supertypes
class Object
trait Matchable
class Any

No unused fragments

No unused fragments

A GraphQL document is only valid if all fragment definitions are spread within operations, or spread within other fragments spread within operations.

Attributes

Supertypes
class Object
trait Matchable
class Any

No unused variables

No unused variables

A GraphQL operation is only valid if all variables defined by an operation are used, either directly or within a spread fragment.

Attributes

Supertypes
class Object
trait Matchable
class Any

Overlapping fields can be merged

Overlapping fields can be merged

A selection set is only valid if all fields (including spreading any fragments) either correspond to distinct response names or can be merged without ambiguity.

The algorithm is described in CachedCheck.

The validation rule implements the same validation as OverlappingFieldsCanBeMerged and could eventually replace it. It is an alternative, more performant implementation.

Attributes

Supertypes
class Object
trait Matchable
class Any

Possible fragment spread

Possible fragment spread

A fragment spread is only valid if the type condition could ever possibly be true: if there is a non-empty intersection of the possible parent types, and possible types which pass the type condition.

Attributes

Supertypes
class Object
trait Matchable
class Any

Provided required arguments

Provided required arguments

A field or directive is only valid if all required (non-null without a default value) field arguments have been provided.

Attributes

Supertypes
class Object
trait Matchable
class Any
class ScalarLeafs extends ValidationRule

Scalar leafs

Scalar leafs

A GraphQL document is valid only if all leaf fields (fields without sub selections) are of scalar or enum types.

Attributes

Supertypes
class Object
trait Matchable
class Any

Subscriptions must only include one field.

Subscriptions must only include one field.

A GraphQL subscription is valid only if it contains a single root field.

Attributes

Supertypes
class Object
trait Matchable
class Any

Unique argument names

Unique argument names

A GraphQL field or directive is only valid if all supplied arguments are uniquely named.

Attributes

Supertypes
class Object
trait Matchable
class Any

Unique directive names per location

Unique directive names per location

A GraphQL document is only valid if all directives at a given location are uniquely named.

Attributes

Supertypes
class Object
trait Matchable
class Any

Unique fragment names

Unique fragment names

A GraphQL document is only valid if all defined fragments have unique names.

Attributes

Supertypes
class Object
trait Matchable
class Any

Unique input field names

Unique input field names

A GraphQL input object value is only valid if all supplied fields are uniquely named.

Attributes

Supertypes
class Object
trait Matchable
class Any

Unique operation names

Unique operation names

A GraphQL document is only valid if all defined operations have unique names.

Attributes

Supertypes
class Object
trait Matchable
class Any

Unique variable names

Unique variable names

A GraphQL operation is only valid if all its variables are uniquely named.

Attributes

Supertypes
class Object
trait Matchable
class Any

Value literals of correct type

Value literals of correct type

A GraphQL document is only valid if all value literals are of the type expected at their position.

Attributes

Supertypes
class Object
trait Matchable
class Any

Variables are input types

Variables are input types

A GraphQL operation is only valid if all the variables it defines are of input types (scalar, enum, or input object).

Attributes

Supertypes
class Object
trait Matchable
class Any

Variables passed to field arguments conform to type

Variables passed to field arguments conform to type

Attributes

Supertypes
class Object
trait Matchable
class Any