Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Ref name = Ref {
- refName :: name
- refPosition :: Position
- data Position = Position {}
- data Message
- anonymousRef :: name -> Ref name
- newtype FieldName = FieldName {}
- type Description = Text
- data Stage
- type CONST = 'CONST
- type VALID = 'VALID
- type RAW = 'RAW
- data Value (stage :: Stage) where
- data ScalarValue
- type Object a = OrdMap FieldName (ObjectEntry a)
- replaceValue :: Value -> Value a
- decodeScientific :: Scientific -> ScalarValue
- convertToJSONName :: FieldName -> FieldName
- convertToHaskellName :: FieldName -> FieldName
- type RawValue = Value RAW
- type ValidValue = Value VALID
- type RawObject = Object RAW
- type ValidObject = Object VALID
- type ResolvedObject = Object CONST
- type ResolvedValue = Value CONST
- data Argument (valid :: Stage) = Argument {
- argumentPosition :: Position
- argumentName :: FieldName
- argumentValue :: Value valid
- type Arguments (s :: Stage) = OrdMap FieldName (Argument s)
- type SelectionSet (s :: Stage) = MergeSet s FieldName (Selection s)
- data SelectionContent (s :: Stage) where
- data Selection (s :: Stage) where
- type Fragments (s :: Stage) = OrdMap FieldName (Fragment s)
- data Fragment (stage :: Stage) = Fragment {
- fragmentName :: FieldName
- fragmentType :: TypeName
- fragmentPosition :: Position
- fragmentSelection :: SelectionSet stage
- fragmentDirectives :: Directives stage
- data Operation (s :: Stage) = Operation {}
- data Variable (stage :: Stage) = Variable {
- variablePosition :: Position
- variableName :: FieldName
- variableType :: TypeRef
- variableValue :: VariableContent (CONST_OR_VALID stage)
- type VariableDefinitions s = OrdMap FieldName (Variable s)
- type DefaultValue = Maybe ResolvedValue
- getOperationName :: Maybe FieldName -> TypeName
- newtype ScalarDefinition = ScalarDefinition {}
- type DataEnum s = [DataEnumValue s]
- type FieldsDefinition cat s = OrdMap FieldName (FieldDefinition cat s)
- newtype ArgumentDefinition s = ArgumentDefinition {
- argument :: FieldDefinition IN s
- type DataUnion s = [UnionMember OUT s]
- type ArgumentsDefinition s = OrdMap FieldName (ArgumentDefinition s)
- data FieldDefinition (cat :: TypeCategory) (s :: Stage) = FieldDefinition {
- fieldDescription :: Maybe Description
- fieldName :: FieldName
- fieldType :: TypeRef
- fieldContent :: Maybe (FieldContent TRUE cat s)
- fieldDirectives :: [Directive s]
- type InputFieldsDefinition s = OrdMap FieldName (InputValueDefinition s)
- data TypeContent (b :: Bool) (a :: TypeCategory) (s :: Stage) where
- DataScalar :: {..} -> CondTypeContent LEAF a s
- DataEnum :: {..} -> CondTypeContent LEAF a s
- DataInputObject :: {..} -> CondTypeContent INPUT_OBJECT a s
- DataInputUnion :: {..} -> CondTypeContent IN a s
- DataObject :: {..} -> CondTypeContent OBJECT a s
- DataUnion :: {..} -> CondTypeContent OUT a s
- DataInterface :: {..} -> CondTypeContent IMPLEMENTABLE a s
- data TypeDefinition (a :: TypeCategory) (s :: Stage) = TypeDefinition {}
- data Schema (s :: Stage) = Schema {
- types :: TypeLib s
- query :: TypeDefinition OBJECT s
- mutation :: Maybe (TypeDefinition OBJECT s)
- subscription :: Maybe (TypeDefinition OBJECT s)
- directiveDefinitions :: [DirectiveDefinition s]
- data DataTypeWrapper
- data TypeKind
- data TypeWrapper
- data TypeRef = TypeRef {}
- data DataEnumValue s = DataEnumValue {}
- data OperationType
- type QUERY = 'Query
- type MUTATION = 'Mutation
- type SUBSCRIPTION = 'Subscription
- data Directive (s :: Stage) = Directive {}
- data ConsD f = ConsD {}
- data TypeCategory
- type DataInputUnion s = [UnionMember IN s]
- data VariableContent (stage :: Stage) where
- DefaultValue :: Maybe ResolvedValue -> VariableContent CONST
- ValidVariableValue :: {..} -> VariableContent VALID
- type TypeLib s = SafeHashMap TypeName (TypeDefinition ANY s)
- initTypeLib :: TypeDefinition OBJECT s -> Schema s
- kindOf :: TypeDefinition a s -> TypeKind
- toNullable :: Nullable a => a -> a
- toHSWrappers :: [DataTypeWrapper] -> [TypeWrapper]
- isNullable :: Nullable a => a -> Bool
- toGQLWrapper :: [TypeWrapper] -> [DataTypeWrapper]
- isWeaker :: [TypeWrapper] -> [TypeWrapper] -> Bool
- isNotSystemTypeName :: TypeName -> Bool
- isLeaf :: TypeContent TRUE a s -> Bool
- isResolverType :: Strictness t => t -> Bool
- mkEnumContent :: LEAF <=! a => [TypeName] -> TypeContent TRUE a s
- createScalarType :: LEAF <=! a => TypeName -> TypeDefinition a s
- mkUnionContent :: [TypeName] -> TypeContent TRUE OUT s
- mkTypeRef :: TypeName -> TypeRef
- mkInputUnionFields :: [UnionMember IN s] -> FieldsDefinition IN s
- fieldVisibility :: FieldDefinition cat s -> Bool
- lookupDeprecated :: [Directive s] -> Maybe (Directive s)
- lookupDeprecatedReason :: Directive s -> Maybe Description
- lookupWith :: Eq k => (a -> k) -> k -> [a] -> Maybe a
- hsTypeName :: TypeName -> TypeName
- data ExecutableDocument = ExecutableDocument {}
- type Variables = SafeHashMap FieldName ResolvedValue
- unsafeFromFields :: [FieldDefinition cat s] -> FieldsDefinition cat s
- newtype OrdMap k a = OrdMap {
- mapEntries :: HashMap k (Indexed k a)
- data GQLError = GQLError {}
- type GQLErrors = [GQLError]
- data ObjectEntry (s :: Stage) = ObjectEntry {
- entryName :: FieldName
- entryValue :: Value s
- data UnionTag = UnionTag {}
- type ANY = 'ANY
- type IN = 'IN
- type OUT = 'OUT
- type OBJECT = 'OBJECT
- type IMPLEMENTABLE = 'IMPLEMENTABLE
- fromAny :: FromCategory a ANY k => a ANY (s :: Stage) -> Maybe (a k s)
- toAny :: ToCategory a k ANY => a (k :: TypeCategory) (s :: Stage) -> a ANY s
- type TRUE = 'True
- type FALSE = 'False
- newtype TypeName = TypeName {
- readTypeName :: Text
- type Token = Text
- class Msg a where
- intercalateName :: FieldName -> [FieldName] -> FieldName
- toFieldName :: TypeName -> FieldName
- fieldsToArguments :: FieldsDefinition IN s -> ArgumentsDefinition s
- mkConsEnum :: DataEnumValue s -> ConsD f
- type Directives s = [Directive s]
- type DirectiveDefinitions s = [DirectiveDefinition s]
- data DirectiveDefinition s = DirectiveDefinition {}
- data DirectiveLocation
- data FieldContent (bool :: Bool) (cat :: TypeCategory) (s :: Stage) where
- DefaultInputValue :: {..} -> FieldContent (IN <=? cat) cat s
- FieldArgs :: {..} -> FieldContent (OUT <=? cat) cat s
- fieldContentArgs :: FieldContent b cat s -> ArgumentsDefinition s
- mkInputValue :: FieldName -> [TypeWrapper] -> TypeName -> FieldDefinition cat s
- mkType :: TypeName -> TypeContent TRUE a s -> TypeDefinition a s
- mkObjectField :: ArgumentsDefinition s -> FieldName -> [TypeWrapper] -> TypeName -> FieldDefinition OUT s
- data UnionMember (cat :: TypeCategory) (s :: Stage) = UnionMember {
- memberName :: TypeName
- nullary :: Bool
- mkUnionMember :: TypeName -> UnionMember cat s
- mkNullaryMember :: TypeName -> UnionMember cat s
- data RawTypeDefinition
- data RootOperationTypeDefinition = RootOperationTypeDefinition {}
- type UnionSelection (s :: Stage) = MergeSet s TypeName UnionTag
- data SchemaDefinition = SchemaDefinition {}
- buildSchema :: (Monad m, Failure ValidationErrors m) => (Maybe SchemaDefinition, [TypeDefinition ANY s], [DirectiveDefinition s]) -> m (Schema s)
- newtype InternalError = InternalError {}
- data ValidationError = ValidationError {}
- msgInternal :: Msg a => a -> InternalError
- getOperationDataType :: Failure ValidationError m => Operation s -> Schema VALID -> m (TypeDefinition OBJECT VALID)
- newtype Typed (cat :: TypeCategory) (s :: Stage) a = Typed a
- typed :: (a c s -> b) -> a c s -> Typed c s b
- untyped :: (a -> b) -> Typed c s a -> b
- msgValidation :: Msg a => a -> ValidationError
- withPosition :: Maybe Position -> ValidationError -> ValidationError
- type ValidationErrors = [ValidationError]
- toGQLError :: ValidationError -> GQLError
- type LEAF = 'LEAF
- type INPUT_OBJECT = 'INPUT_OBJECT
- class ToCategory a (k :: TypeCategory) (k' :: TypeCategory) where
- toCategory :: a k (s :: Stage) -> a k' s
- class FromCategory a (k :: TypeCategory) (k' :: TypeCategory) where
- fromCategory :: a k (s :: Stage) -> Maybe (a k' s)
- possibleTypes :: TypeDefinition a s -> Schema s' -> [TypeName]
- possibleInterfaceTypes :: TypeName -> Schema s -> [TypeDefinition ANY s]
- mkField :: Maybe (FieldContent TRUE cat s) -> FieldName -> TypeRef -> FieldDefinition cat s
- defineSchemaWith :: (Monad f, Failure ValidationErrors f) => [TypeDefinition cat s] -> (Maybe (TypeDefinition OBJECT s), Maybe (TypeDefinition OBJECT s), Maybe (TypeDefinition OBJECT s)) -> f (Schema s)
- type (<=!) (a :: TypeCategory) (b :: TypeCategory) = (a <=? b) ~ TRUE
- type family ToOBJECT (s :: TypeCategory) :: TypeCategory where ...
- constraintInputUnion :: forall stage schemaStage. [UnionMember IN schemaStage] -> Object stage -> Either Message (UnionMember IN schemaStage, Value stage)
- getInputUnionValue :: forall stage. Object stage -> Either Message (TypeName, Value stage)
- unitFieldName :: FieldName
- unitTypeName :: TypeName
Documentation
Ref | |
|
Instances
Instances
Eq Position Source # | |
Ord Position Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base | |
Show Position Source # | |
Generic Position Source # | |
ToJSON Position Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base | |
FromJSON Position Source # | |
Lift Position Source # | |
type Rep Position Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base type Rep Position = D1 ('MetaData "Position" "Data.Morpheus.Types.Internal.AST.Base" "morpheus-graphql-core-0.17.0-7ZBOXRBXZZbKGAPpOJbGqu" 'False) (C1 ('MetaCons "Position" 'PrefixI 'True) (S1 ('MetaSel ('Just "line") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just "column") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int))) |
Instances
Eq Message Source # | |
Ord Message Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base | |
Show Message Source # | |
IsString Message Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base fromString :: String -> Message # | |
Generic Message Source # | |
Semigroup Message Source # | |
Hashable Message Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base | |
ToJSON Message Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base | |
FromJSON Message Source # | |
Msg Message Source # | |
Lift Message Source # | |
type Rep Message Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base |
anonymousRef :: name -> Ref name Source #
Instances
type Description = Text Source #
data Value (stage :: Stage) where Source #
ResolvedVariable :: Ref FieldName -> Variable VALID -> Value CONST | |
VariableValue :: Ref FieldName -> Value RAW | |
Object :: Object stage -> Value stage | |
List :: [Value stage] -> Value stage | |
Enum :: TypeName -> Value stage | |
Scalar :: ScalarValue -> Value stage | |
Null :: Value stage |
data ScalarValue Source #
Primitive Values for GQLScalar: Int
, Float
, String
, Boolean
.
for performance reason type Text
represents GraphQl String
value
Instances
replaceValue :: Value -> Value a Source #
type ValidValue = Value VALID Source #
type ValidObject = Object VALID Source #
type ResolvedObject = Object CONST Source #
type ResolvedValue = Value CONST Source #
data Argument (valid :: Stage) Source #
Argument | |
|
Instances
Lift (Argument valid :: Type) Source # | |
KeyOf FieldName (Argument stage) Source # | |
Eq (Argument valid) Source # | |
Show (Argument valid) Source # | |
RenderGQL (Argument s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Fields | |
NameCollision (Argument s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Fields nameCollision :: Argument s -> ValidationError Source # |
data SelectionContent (s :: Stage) where Source #
SelectionField :: SelectionContent s | |
SelectionSet :: SelectionSet s -> SelectionContent s | |
UnionSelection :: UnionSelection VALID -> SelectionContent VALID |
Instances
data Selection (s :: Stage) where Source #
Selection | |
| |
InlineFragment :: Fragment RAW -> Selection RAW | |
Spread :: Directives RAW -> Ref FieldName -> Selection RAW |
Instances
Lift (Selection a :: Type) Source # | |
KeyOf FieldName (Selection s) Source # | |
(Monad m, SemigroupM m (SelectionSet a), Failure ValidationErrors m) => SemigroupM m (Selection a) Source # | |
Eq (Selection a) Source # | |
Show (Selection a) Source # | |
RenderGQL (Selection VALID) Source # | |
SelectionTree (Selection VALID) Source # | |
data Fragment (stage :: Stage) Source #
Fragment | |
|
data Variable (stage :: Stage) Source #
Variable | |
|
type DefaultValue = Maybe ResolvedValue Source #
newtype ScalarDefinition Source #
Instances
Eq ScalarDefinition Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem (==) :: ScalarDefinition -> ScalarDefinition -> Bool # (/=) :: ScalarDefinition -> ScalarDefinition -> Bool # | |
Show ScalarDefinition Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem showsPrec :: Int -> ScalarDefinition -> ShowS # show :: ScalarDefinition -> String # showList :: [ScalarDefinition] -> ShowS # | |
Lift ScalarDefinition Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem lift :: ScalarDefinition -> Q Exp # liftTyped :: ScalarDefinition -> Q (TExp ScalarDefinition) # |
type DataEnum s = [DataEnumValue s] Source #
type FieldsDefinition cat s = OrdMap FieldName (FieldDefinition cat s) Source #
newtype ArgumentDefinition s Source #
Instances
type DataUnion s = [UnionMember OUT s] Source #
type ArgumentsDefinition s = OrdMap FieldName (ArgumentDefinition s) Source #
data FieldDefinition (cat :: TypeCategory) (s :: Stage) Source #
FieldDefinition | |
|
Instances
type InputFieldsDefinition s = OrdMap FieldName (InputValueDefinition s) Source #
data TypeContent (b :: Bool) (a :: TypeCategory) (s :: Stage) where Source #
DataScalar | |
| |
DataEnum | |
| |
DataInputObject | |
| |
DataInputUnion | |
| |
DataObject | |
| |
DataUnion | |
| |
DataInterface | |
|
Instances
data TypeDefinition (a :: TypeCategory) (s :: Stage) Source #
TypeDefinition | |
|
Instances
data Schema (s :: Stage) Source #
Schema | |
|
Instances
Lift (Schema s :: Type) Source # | |
(Monad m, Failure ValidationErrors m) => SemigroupM m (Schema s) Source # | |
Selectable TypeName (TypeDefinition ANY s) (Schema s) Source # | |
Show (Schema s) Source # | |
RenderGQL (Schema s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem | |
(Monad m, Failure ValidationErrors m) => FromElems (m :: Type -> Type) (TypeDefinition ANY s) (Schema s :: Type) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem | |
Elems (TypeDefinition ANY s) (Schema s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem |
data DataTypeWrapper Source #
Instances
Show DataTypeWrapper Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Type showsPrec :: Int -> DataTypeWrapper -> ShowS # show :: DataTypeWrapper -> String # showList :: [DataTypeWrapper] -> ShowS # | |
Lift DataTypeWrapper Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Type lift :: DataTypeWrapper -> Q Exp # liftTyped :: DataTypeWrapper -> Q (TExp DataTypeWrapper) # |
KindScalar | |
KindObject (Maybe OperationType) | |
KindUnion | |
KindEnum | |
KindInputObject | |
KindList | |
KindNonNull | |
KindInputUnion | |
KindInterface |
data TypeWrapper Source #
Instances
Eq TypeWrapper Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Type (==) :: TypeWrapper -> TypeWrapper -> Bool # (/=) :: TypeWrapper -> TypeWrapper -> Bool # | |
Show TypeWrapper Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Type showsPrec :: Int -> TypeWrapper -> ShowS # show :: TypeWrapper -> String # showList :: [TypeWrapper] -> ShowS # | |
Lift TypeWrapper Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Type lift :: TypeWrapper -> Q Exp # liftTyped :: TypeWrapper -> Q (TExp TypeWrapper) # |
data DataEnumValue s Source #
DataEnumValue | |
|
Instances
Lift (DataEnumValue s :: Type) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem lift :: DataEnumValue s -> Q Exp # liftTyped :: DataEnumValue s -> Q (TExp (DataEnumValue s)) # | |
Eq (DataEnumValue s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem (==) :: DataEnumValue s -> DataEnumValue s -> Bool # (/=) :: DataEnumValue s -> DataEnumValue s -> Bool # | |
Show (DataEnumValue s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem showsPrec :: Int -> DataEnumValue s -> ShowS # show :: DataEnumValue s -> String # showList :: [DataEnumValue s] -> ShowS # | |
RenderGQL (DataEnumValue s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem renderGQL :: DataEnumValue s -> Rendering Source # |
data OperationType Source #
Instances
type SUBSCRIPTION = 'Subscription Source #
data TypeCategory Source #
Instances
Eq TypeCategory Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeCategory (==) :: TypeCategory -> TypeCategory -> Bool # (/=) :: TypeCategory -> TypeCategory -> Bool # | |
Ord TypeCategory Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeCategory compare :: TypeCategory -> TypeCategory -> Ordering # (<) :: TypeCategory -> TypeCategory -> Bool # (<=) :: TypeCategory -> TypeCategory -> Bool # (>) :: TypeCategory -> TypeCategory -> Bool # (>=) :: TypeCategory -> TypeCategory -> Bool # max :: TypeCategory -> TypeCategory -> TypeCategory # min :: TypeCategory -> TypeCategory -> TypeCategory # | |
Show TypeCategory Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeCategory showsPrec :: Int -> TypeCategory -> ShowS # show :: TypeCategory -> String # showList :: [TypeCategory] -> ShowS # |
type DataInputUnion s = [UnionMember IN s] Source #
data VariableContent (stage :: Stage) where Source #
DefaultValue :: Maybe ResolvedValue -> VariableContent CONST | |
ValidVariableValue | |
|
Instances
Lift (VariableContent a :: Type) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Value lift :: VariableContent a -> Q Exp # liftTyped :: VariableContent a -> Q (TExp (VariableContent a)) # | |
Eq (VariableContent a) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Value (==) :: VariableContent a -> VariableContent a -> Bool # (/=) :: VariableContent a -> VariableContent a -> Bool # | |
Show (VariableContent a) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Value showsPrec :: Int -> VariableContent a -> ShowS # show :: VariableContent a -> String # showList :: [VariableContent a] -> ShowS # |
initTypeLib :: TypeDefinition OBJECT s -> Schema s Source #
kindOf :: TypeDefinition a s -> TypeKind Source #
toNullable :: Nullable a => a -> a Source #
toHSWrappers :: [DataTypeWrapper] -> [TypeWrapper] Source #
isNullable :: Nullable a => a -> Bool Source #
toGQLWrapper :: [TypeWrapper] -> [DataTypeWrapper] Source #
isWeaker :: [TypeWrapper] -> [TypeWrapper] -> Bool Source #
isNotSystemTypeName :: TypeName -> Bool Source #
isResolverType :: Strictness t => t -> Bool Source #
mkEnumContent :: LEAF <=! a => [TypeName] -> TypeContent TRUE a s Source #
createScalarType :: LEAF <=! a => TypeName -> TypeDefinition a s Source #
mkUnionContent :: [TypeName] -> TypeContent TRUE OUT s Source #
mkInputUnionFields :: [UnionMember IN s] -> FieldsDefinition IN s Source #
fieldVisibility :: FieldDefinition cat s -> Bool Source #
lookupWith :: Eq k => (a -> k) -> k -> [a] -> Maybe a Source #
hsTypeName :: TypeName -> TypeName Source #
data ExecutableDocument Source #
Instances
Show ExecutableDocument Source # | |
Defined in Data.Morpheus.Types.Internal.AST showsPrec :: Int -> ExecutableDocument -> ShowS # show :: ExecutableDocument -> String # showList :: [ExecutableDocument] -> ShowS # | |
Lift ExecutableDocument Source # | |
Defined in Data.Morpheus.Types.Internal.AST lift :: ExecutableDocument -> Q Exp # liftTyped :: ExecutableDocument -> Q (TExp ExecutableDocument) # |
type Variables = SafeHashMap FieldName ResolvedValue Source #
unsafeFromFields :: [FieldDefinition cat s] -> FieldsDefinition cat s Source #
OrdMap | |
|
Instances
Instances
Eq GQLError Source # | |
Show GQLError Source # | |
Generic GQLError Source # | |
ToJSON GQLError Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base | |
FromJSON GQLError Source # | |
Monad m => Failure GQLErrors (ResultT event m) Source # | |
Failure [GQLError] (Result ev) Source # | |
type Rep GQLError Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base type Rep GQLError = D1 ('MetaData "GQLError" "Data.Morpheus.Types.Internal.AST.Base" "morpheus-graphql-core-0.17.0-7ZBOXRBXZZbKGAPpOJbGqu" 'False) (C1 ('MetaCons "GQLError" 'PrefixI 'True) (S1 ('MetaSel ('Just "message") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Message) :*: S1 ('MetaSel ('Just "locations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Position]))) |
data ObjectEntry (s :: Stage) Source #
ObjectEntry | |
|
Instances
Lift (ObjectEntry a :: Type) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Value lift :: ObjectEntry a -> Q Exp # liftTyped :: ObjectEntry a -> Q (TExp (ObjectEntry a)) # | |
KeyOf FieldName (ObjectEntry s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Value keyOf :: ObjectEntry s -> FieldName Source # | |
Eq (ObjectEntry s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Value (==) :: ObjectEntry s -> ObjectEntry s -> Bool # (/=) :: ObjectEntry s -> ObjectEntry s -> Bool # | |
Show (ObjectEntry s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Value showsPrec :: Int -> ObjectEntry s -> ShowS # show :: ObjectEntry s -> String # showList :: [ObjectEntry s] -> ShowS # | |
RenderGQL (ObjectEntry a) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Value renderGQL :: ObjectEntry a -> Rendering Source # | |
NameCollision (ObjectEntry s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Value nameCollision :: ObjectEntry s -> ValidationError Source # |
type IMPLEMENTABLE = 'IMPLEMENTABLE Source #
toAny :: ToCategory a k ANY => a (k :: TypeCategory) (s :: Stage) -> a ANY s Source #
Instances
Instances
Msg ByteString Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base | |
Msg String Source # | |
Msg Text Source # | |
Msg Value Source # | |
Msg OperationType Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base | |
Msg TypeName Source # | |
Msg FieldName Source # | |
Msg InternalError Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base | |
Msg Message Source # | |
Msg DirectiveLocation Source # | |
Msg TypeRef Source # | |
Msg (Value a) Source # | |
Msg (UnionMember cat s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Union |
toFieldName :: TypeName -> FieldName Source #
mkConsEnum :: DataEnumValue s -> ConsD f Source #
type Directives s = [Directive s] Source #
type DirectiveDefinitions s = [DirectiveDefinition s] Source #
data DirectiveDefinition s Source #
Instances
Lift (DirectiveDefinition s :: Type) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Fields lift :: DirectiveDefinition s -> Q Exp # liftTyped :: DirectiveDefinition s -> Q (TExp (DirectiveDefinition s)) # | |
KeyOf FieldName (DirectiveDefinition s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Fields keyOf :: DirectiveDefinition s -> FieldName Source # | |
Selectable FieldName (ArgumentDefinition s) (DirectiveDefinition s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Fields selectOr :: d -> (ArgumentDefinition s -> d) -> FieldName -> DirectiveDefinition s -> d Source # member :: FieldName -> DirectiveDefinition s -> Bool Source # | |
Show (DirectiveDefinition s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Fields showsPrec :: Int -> DirectiveDefinition s -> ShowS # show :: DirectiveDefinition s -> String # showList :: [DirectiveDefinition s] -> ShowS # |
data DirectiveLocation Source #
Instances
Eq DirectiveLocation Source # | |
Defined in Data.Morpheus.Types.Internal.AST.DirectiveLocation (==) :: DirectiveLocation -> DirectiveLocation -> Bool # (/=) :: DirectiveLocation -> DirectiveLocation -> Bool # | |
Show DirectiveLocation Source # | |
Defined in Data.Morpheus.Types.Internal.AST.DirectiveLocation showsPrec :: Int -> DirectiveLocation -> ShowS # show :: DirectiveLocation -> String # showList :: [DirectiveLocation] -> ShowS # | |
Msg DirectiveLocation Source # | |
Lift DirectiveLocation Source # | |
Defined in Data.Morpheus.Types.Internal.AST.DirectiveLocation lift :: DirectiveLocation -> Q Exp # liftTyped :: DirectiveLocation -> Q (TExp DirectiveLocation) # |
data FieldContent (bool :: Bool) (cat :: TypeCategory) (s :: Stage) where Source #
DefaultInputValue | |
| |
FieldArgs | |
|
Instances
Lift (FieldContent bool cat s :: Type) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Fields lift :: FieldContent bool cat s -> Q Exp # liftTyped :: FieldContent bool cat s -> Q (TExp (FieldContent bool cat s)) # | |
ToCategory (FieldContent TRUE) a ANY Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Fields toCategory :: forall (s :: Stage). FieldContent TRUE a s -> FieldContent TRUE ANY s Source # | |
Eq (FieldContent bool cat s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Fields (==) :: FieldContent bool cat s -> FieldContent bool cat s -> Bool # (/=) :: FieldContent bool cat s -> FieldContent bool cat s -> Bool # | |
Show (FieldContent bool cat s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Fields showsPrec :: Int -> FieldContent bool cat s -> ShowS # show :: FieldContent bool cat s -> String # showList :: [FieldContent bool cat s] -> ShowS # |
fieldContentArgs :: FieldContent b cat s -> ArgumentsDefinition s Source #
mkInputValue :: FieldName -> [TypeWrapper] -> TypeName -> FieldDefinition cat s Source #
mkType :: TypeName -> TypeContent TRUE a s -> TypeDefinition a s Source #
mkObjectField :: ArgumentsDefinition s -> FieldName -> [TypeWrapper] -> TypeName -> FieldDefinition OUT s Source #
data UnionMember (cat :: TypeCategory) (s :: Stage) Source #
UnionMember | |
|
Instances
Lift (UnionMember cat s :: Type) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Union lift :: UnionMember cat s -> Q Exp # liftTyped :: UnionMember cat s -> Q (TExp (UnionMember cat s)) # | |
KeyOf TypeName (UnionMember cat s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Union keyOf :: UnionMember cat s -> TypeName Source # | |
Eq (UnionMember cat s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Union (==) :: UnionMember cat s -> UnionMember cat s -> Bool # (/=) :: UnionMember cat s -> UnionMember cat s -> Bool # | |
Show (UnionMember cat s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Union showsPrec :: Int -> UnionMember cat s -> ShowS # show :: UnionMember cat s -> String # showList :: [UnionMember cat s] -> ShowS # | |
RenderGQL (UnionMember cat s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Union renderGQL :: UnionMember cat s -> Rendering Source # | |
Msg (UnionMember cat s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Union |
mkUnionMember :: TypeName -> UnionMember cat s Source #
mkNullaryMember :: TypeName -> UnionMember cat s Source #
data RawTypeDefinition Source #
RawSchemaDefinition SchemaDefinition | |
RawTypeDefinition (TypeDefinition ANY CONST) | |
RawDirectiveDefinition (DirectiveDefinition CONST) |
Instances
Show RawTypeDefinition Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem showsPrec :: Int -> RawTypeDefinition -> ShowS # show :: RawTypeDefinition -> String # showList :: [RawTypeDefinition] -> ShowS # |
data RootOperationTypeDefinition Source #
Instances
data SchemaDefinition Source #
Instances
Show SchemaDefinition Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem showsPrec :: Int -> SchemaDefinition -> ShowS # show :: SchemaDefinition -> String # showList :: [SchemaDefinition] -> ShowS # | |
RenderGQL SchemaDefinition Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem renderGQL :: SchemaDefinition -> Rendering Source # | |
NameCollision SchemaDefinition Source # | |
KeyOf TypeName SchemaDefinition Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem keyOf :: SchemaDefinition -> TypeName Source # | |
Selectable OperationType RootOperationTypeDefinition SchemaDefinition Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem selectOr :: d -> (RootOperationTypeDefinition -> d) -> OperationType -> SchemaDefinition -> d Source # member :: OperationType -> SchemaDefinition -> Bool Source # |
buildSchema :: (Monad m, Failure ValidationErrors m) => (Maybe SchemaDefinition, [TypeDefinition ANY s], [DirectiveDefinition s]) -> m (Schema s) Source #
newtype InternalError Source #
Instances
data ValidationError Source #
Instances
Show ValidationError Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base showsPrec :: Int -> ValidationError -> ShowS # show :: ValidationError -> String # showList :: [ValidationError] -> ShowS # | |
IsString ValidationError Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base fromString :: String -> ValidationError # | |
Semigroup ValidationError Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base (<>) :: ValidationError -> ValidationError -> ValidationError # sconcat :: NonEmpty ValidationError -> ValidationError # stimes :: Integral b => b -> ValidationError -> ValidationError # | |
Failure [ValidationError] (Result ev) Source # | |
Defined in Data.Morpheus.Ext.Result failure :: [ValidationError] -> Result ev v Source # |
msgInternal :: Msg a => a -> InternalError Source #
getOperationDataType :: Failure ValidationError m => Operation s -> Schema VALID -> m (TypeDefinition OBJECT VALID) Source #
newtype Typed (cat :: TypeCategory) (s :: Stage) a Source #
used for preserving type information from untyped values see function typed
Typed a |
msgValidation :: Msg a => a -> ValidationError Source #
type ValidationErrors = [ValidationError] Source #
toGQLError :: ValidationError -> GQLError Source #
type INPUT_OBJECT = 'INPUT_OBJECT Source #
class ToCategory a (k :: TypeCategory) (k' :: TypeCategory) where Source #
toCategory :: a k (s :: Stage) -> a k' s Source #
Instances
class FromCategory a (k :: TypeCategory) (k' :: TypeCategory) where Source #
fromCategory :: a k (s :: Stage) -> Maybe (a k' s) Source #
Instances
possibleTypes :: TypeDefinition a s -> Schema s' -> [TypeName] Source #
possibleInterfaceTypes :: TypeName -> Schema s -> [TypeDefinition ANY s] Source #
mkField :: Maybe (FieldContent TRUE cat s) -> FieldName -> TypeRef -> FieldDefinition cat s Source #
defineSchemaWith :: (Monad f, Failure ValidationErrors f) => [TypeDefinition cat s] -> (Maybe (TypeDefinition OBJECT s), Maybe (TypeDefinition OBJECT s), Maybe (TypeDefinition OBJECT s)) -> f (Schema s) Source #
type (<=!) (a :: TypeCategory) (b :: TypeCategory) = (a <=? b) ~ TRUE Source #
type family ToOBJECT (s :: TypeCategory) :: TypeCategory where ... Source #
constraintInputUnion :: forall stage schemaStage. [UnionMember IN schemaStage] -> Object stage -> Either Message (UnionMember IN schemaStage, Value stage) Source #