graphql-engine-1.0.0: GraphQL API over Postgres
Safe HaskellNone
LanguageHaskell2010

Hasura.RQL.DDL.CustomTypes

Synopsis

Documentation

validateCustomTypeDefinitions Source #

Arguments

:: forall m. MonadValidate [CustomTypeValidationError] m 
=> SourceCache 
-> CustomTypes 
-> BackendMap ScalarMap

A map that, to each backend, associates the set of all its scalars.

-> m AnnotatedCustomTypes 

Validate the custom types and return any reused Postgres base types (as scalars).

data CustomTypeValidationError Source #

Constructors

DuplicateTypeNames (HashSet Name)

type names have to be unique across all types

InputObjectFieldTypeDoesNotExist InputObjectTypeName InputObjectFieldName Name

field name and the field's base type

InputObjectDuplicateFields InputObjectTypeName (HashSet InputObjectFieldName)

duplicate field declaration in input objects

ObjectFieldTypeDoesNotExist ObjectTypeName ObjectFieldName Name

field name and the field's base type

ObjectDuplicateFields ObjectTypeName (HashSet Name)

duplicate field declaration in objects

ObjectFieldArgumentsNotAllowed ObjectTypeName ObjectFieldName

object fields can't have arguments

ObjectFieldObjectBaseType ObjectTypeName ObjectFieldName Name

object fields can't have object types as base types

ObjectRelationshipTableDoesNotExist ObjectTypeName RelationshipName QualifiedTable

The table specified in the relationship does not exist

ObjectRelationshipFieldDoesNotExist ObjectTypeName RelationshipName ObjectFieldName

The field specified in the relationship mapping does not exist

ObjectRelationshipFieldListType ObjectTypeName RelationshipName ObjectFieldName

The field specified in the relationship mapping is a list type

ObjectRelationshipColumnDoesNotExist ObjectTypeName RelationshipName QualifiedTable PGCol

The column specified in the relationship mapping does not exist

ObjectRelationshipMultiSources ObjectTypeName

Object relationship refers to table in multiple sources

DuplicateEnumValues EnumTypeName (HashSet EnumValue)

duplicate enum values