| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.Morpheus.Types.Internal.AST
Synopsis
- data Ref = Ref {}
- data Position = Position {}
- data Message
- anonymousRef :: FieldName -> Ref
- 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)
- class GQLValue a where
- gqlNull :: a
- gqlScalar :: ScalarValue -> a
- gqlBoolean :: Bool -> a
- gqlString :: Text -> a
- gqlList :: [a] -> a
- gqlObject :: [(FieldName, a)] -> 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
- splitDuplicates :: Eq a => [a] -> ([a], [a])
- removeDuplicates :: Eq a => [a] -> [a]
- data Argument (valid :: Stage) = Argument {
- argumentName :: FieldName
- argumentPosition :: Position
- argumentValue :: Value valid
- type Arguments (s :: Stage) = OrdMap FieldName (Argument s)
- type SelectionSet (s :: Stage) = MergeSet s (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 {
- variableName :: FieldName
- variableType :: TypeRef
- variablePosition :: Position
- 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 = Fields (FieldDefinition cat s)
- type ArgumentDefinition = FieldDefinition IN
- type DataUnion s = [UnionMember OUT s]
- data ArgumentsDefinition s = ArgumentsDefinition {}
- data FieldDefinition (cat :: TypeCategory) (s :: Stage) = FieldDefinition {
- fieldName :: FieldName
- fieldDescription :: Maybe Description
- fieldType :: TypeRef
- fieldDirectives :: [Directive s]
- fieldContent :: Maybe (FieldContent TRUE cat s)
- type InputFieldsDefinition s = Fields (InputValueDefinition s)
- data TypeContent (b :: Bool) (a :: TypeCategory) (s :: Stage) where
- DataScalar :: {..} -> TypeContent (ELEM LEAF a) a s
- DataEnum :: {..} -> TypeContent (ELEM LEAF a) a s
- DataInputObject :: {..} -> TypeContent (ELEM IN a) a s
- DataInputUnion :: {..} -> TypeContent (ELEM IN a) a s
- DataObject :: {..} -> TypeContent (ELEM OBJECT a) a s
- DataUnion :: {..} -> TypeContent (ELEM OUT a) a s
- DataInterface :: {..} -> TypeContent (ELEM IMPLEMENTABLE a) 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 DataFingerprint = DataFingerprint TypeName [String]
- 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 cat s = ConsD {
- cName :: TypeName
- cFields :: [FieldDefinition cat s]
- 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
- toListField :: FieldDefinition cat s -> FieldDefinition cat s
- isObject :: TypeKind -> Bool
- isInput :: TypeKind -> Bool
- toHSWrappers :: [DataTypeWrapper] -> [TypeWrapper]
- isNullable :: Nullable a => a -> Bool
- toGQLWrapper :: [TypeWrapper] -> [DataTypeWrapper]
- isWeaker :: [TypeWrapper] -> [TypeWrapper] -> Bool
- isSubscription :: TypeKind -> Bool
- isOutputObject :: TypeKind -> Bool
- isNotSystemTypeName :: TypeName -> Bool
- isEntNode :: TypeContent TRUE a s -> Bool
- mkEnumContent :: ELEM LEAF a ~ TRUE => [TypeName] -> TypeContent TRUE a s
- createScalarType :: ELEM LEAF a ~ TRUE => TypeName -> TypeDefinition a s
- mkUnionContent :: [TypeName] -> TypeContent TRUE OUT s
- mkTypeRef :: TypeName -> TypeRef
- mkInputUnionFields :: TypeName -> [UnionMember IN s] -> FieldsDefinition IN s
- fieldVisibility :: FieldDefinition cat s -> Bool
- insertType :: (Monad m, Failure ValidationErrors m) => TypeDefinition cat s -> UpdateT m (Schema s)
- lookupDeprecated :: [Directive s] -> Maybe (Directive s)
- lookupDeprecatedReason :: Directive s -> Maybe Description
- lookupWith :: Eq k => (a -> k) -> k -> [a] -> Maybe a
- hsTypeName :: TypeName -> TypeName
- data GQLQuery = GQLQuery {
- fragments :: Fragments RAW
- operation :: Operation RAW
- inputVariables :: [(FieldName, ResolvedValue)]
- type Variables = HashMap FieldName ResolvedValue
- unsafeFromFields :: [FieldDefinition cat s] -> FieldsDefinition cat s
- data OrdMap k a
- data GQLError = GQLError {}
- type GQLErrors = [GQLError]
- data ObjectEntry (s :: Stage) = ObjectEntry {
- entryName :: FieldName
- entryValue :: Value s
- data UnionTag = UnionTag {}
- __inputname :: FieldName
- updateSchema :: (Monad m, Failure ValidationErrors m) => TypeName -> DataFingerprint -> [UpdateT m (Schema s)] -> (a -> TypeDefinition cat s) -> a -> UpdateT m (Schema s)
- internalFingerprint :: TypeName -> [String] -> DataFingerprint
- 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
- data TypeNameRef = TypeNameRef {}
- isEnum :: [ConsD cat s] -> Bool
- newtype Fields def = Fields {}
- fieldsToArguments :: FieldsDefinition IN s -> ArgumentsDefinition s
- mkCons :: TypeName -> FieldsDefinition cat s -> ConsD cat s
- mkConsEnum :: DataEnumValue s -> ConsD cat s
- 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 (ELEM IN cat) cat s
- FieldArgs :: {..} -> FieldContent (ELEM 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
- data TypeNameTH = TypeNameTH {}
- isOutput :: TypeKind -> Bool
- mkObjectField :: ArgumentsDefinition s -> FieldName -> [TypeWrapper] -> TypeName -> FieldDefinition OUT s
- data UnionMember (cat :: TypeCategory) (s :: Stage) = UnionMember {
- memberName :: TypeName
- visibility :: Bool
- mkUnionMember :: TypeName -> UnionMember cat s
- data RawTypeDefinition
- data RootOperationTypeDefinition = RootOperationTypeDefinition {}
- type UnionSelection (s :: Stage) = MergeSet s 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 family ELEM (elemKind :: TypeCategory) (setOfKind :: TypeCategory) :: Bool
- type LEAF = LEAF
- type REQURE_IMPLEMENTABLE cat = ELEM cat IMPLEMENTABLE ~ TRUE
- 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]
Documentation
Constructors
| Ref | |
Fields
| |
Instances
| Eq Position Source # | |
| Show Position Source # | |
| Generic Position Source # | |
| Lift Position Source # | |
| ToJSON Position Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base | |
| FromJSON 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.14.0-DVAWEySgEHXLULGJqXC6uS" 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 Methods fromString :: String -> Message # | |
| Generic Message Source # | |
| Semigroup Message Source # | |
| Lift 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 # | |
| (LiftOperation o, Monad m) => Failure Message (Resolver o e m) Source # | |
| type Rep Message Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base | |
anonymousRef :: FieldName -> Ref Source #
Instances
type Description = Text Source #
data Value (stage :: Stage) where Source #
Constructors
| ResolvedVariable :: Ref -> Variable VALID -> Value CONST | |
| VariableValue :: Ref -> Value RAW | |
| Object :: Object stage -> Value stage | |
| List :: [Value stage] -> Value stage | |
| Enum :: TypeName -> Value stage | |
| Scalar :: ScalarValue -> Value stage | |
| Null :: Value stage |
Instances
| Eq (Value s) Source # | |
| Show (Value a) Source # | |
| Lift (Value a) Source # | |
| ToJSON (Value a) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Value | |
| FromJSON (Value a) Source # | |
| RenderGQL (Value a) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Value | |
| Msg (Value a) Source # | |
| GQLValue (Value a) Source # | |
data ScalarValue Source #
Primitive Values for GQLScalar: ScalarValue, ScalarValue, String, Boolean.
for performance reason type Text represents GraphQl String value
Instances
class GQLValue a where Source #
Methods
gqlScalar :: ScalarValue -> a Source #
gqlBoolean :: Bool -> a Source #
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 #
splitDuplicates :: Eq a => [a] -> ([a], [a]) Source #
removeDuplicates :: Eq a => [a] -> [a] Source #
data Argument (valid :: Stage) Source #
Constructors
| Argument | |
Fields
| |
type SelectionSet (s :: Stage) = MergeSet s (Selection s) Source #
data SelectionContent (s :: Stage) where Source #
Constructors
| SelectionField :: SelectionContent s | |
| SelectionSet :: SelectionSet s -> SelectionContent s | |
| UnionSelection :: UnionSelection VALID -> SelectionContent VALID |
Instances
| Eq (SelectionContent a) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Selection Methods (==) :: SelectionContent a -> SelectionContent a -> Bool # (/=) :: SelectionContent a -> SelectionContent a -> Bool # | |
| Show (SelectionContent a) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Selection Methods showsPrec :: Int -> SelectionContent a -> ShowS # show :: SelectionContent a -> String # showList :: [SelectionContent a] -> ShowS # | |
| Lift (SelectionContent a) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Selection Methods lift :: SelectionContent a -> Q Exp # | |
| RenderGQL (SelectionContent VALID) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Selection Methods render :: SelectionContent VALID -> Rendering Source # | |
| Merge (SelectionSet s) => Merge (SelectionContent s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Selection Methods merge :: (Monad m, Failure ValidationErrors m) => [Ref] -> SelectionContent s -> SelectionContent s -> m (SelectionContent s) Source # | |
data Selection (s :: Stage) where Source #
Constructors
| Selection | |
Fields
| |
| InlineFragment :: Fragment RAW -> Selection RAW | |
| Spread :: Directives RAW -> Ref -> Selection RAW | |
data Fragment (stage :: Stage) Source #
Constructors
| Fragment | |
Fields
| |
data Operation (s :: Stage) Source #
Constructors
| Operation | |
data Variable (stage :: Stage) Source #
Constructors
| Variable | |
Fields
| |
type DefaultValue = Maybe ResolvedValue Source #
newtype ScalarDefinition Source #
Constructors
| ScalarDefinition | |
Instances
| Show ScalarDefinition Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem Methods showsPrec :: Int -> ScalarDefinition -> ShowS # show :: ScalarDefinition -> String # showList :: [ScalarDefinition] -> ShowS # | |
| Lift ScalarDefinition Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem Methods lift :: ScalarDefinition -> Q Exp # | |
type DataEnum s = [DataEnumValue s] Source #
type FieldsDefinition cat s = Fields (FieldDefinition cat s) Source #
type ArgumentDefinition = FieldDefinition IN Source #
type DataUnion s = [UnionMember OUT s] Source #
data ArgumentsDefinition s Source #
Constructors
| ArgumentsDefinition | |
Fields | |
Instances
data FieldDefinition (cat :: TypeCategory) (s :: Stage) Source #
Constructors
| FieldDefinition | |
Fields
| |
Instances
type InputFieldsDefinition s = Fields (InputValueDefinition s) Source #
data TypeContent (b :: Bool) (a :: TypeCategory) (s :: Stage) where Source #
Constructors
| DataScalar | |
Fields
| |
| DataEnum | |
Fields
| |
| DataInputObject | |
Fields
| |
| DataInputUnion | |
Fields
| |
| DataObject | |
Fields
| |
| DataUnion | |
Fields
| |
| DataInterface | |
Fields
| |
Instances
data TypeDefinition (a :: TypeCategory) (s :: Stage) Source #
Constructors
| TypeDefinition | |
Fields
| |
Instances
data Schema (s :: Stage) Source #
Constructors
| Schema | |
Fields
| |
Instances
| Selectable TypeName (TypeDefinition ANY s) (Schema s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem | |
| Show (Schema s) Source # | |
| Lift (Schema s) Source # | |
| RenderGQL (Schema s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem | |
| Merge (Schema s) Source # | |
| Listable (TypeDefinition ANY s) (Schema s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem Methods elems :: Schema s -> [TypeDefinition ANY s] Source # fromElems :: (Monad m, Failure ValidationErrors m) => [TypeDefinition ANY s] -> m (Schema s) Source # | |
data DataTypeWrapper Source #
Constructors
| ListType | |
| NonNullType |
Instances
| Show DataTypeWrapper Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base Methods showsPrec :: Int -> DataTypeWrapper -> ShowS # show :: DataTypeWrapper -> String # showList :: [DataTypeWrapper] -> ShowS # | |
| Lift DataTypeWrapper Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base Methods lift :: DataTypeWrapper -> Q Exp # | |
Constructors
| KindScalar | |
| KindObject (Maybe OperationType) | |
| KindUnion | |
| KindEnum | |
| KindInputObject | |
| KindList | |
| KindNonNull | |
| KindInputUnion | |
| KindInterface |
data DataFingerprint Source #
Constructors
| DataFingerprint TypeName [String] |
Instances
| Eq DataFingerprint Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base Methods (==) :: DataFingerprint -> DataFingerprint -> Bool # (/=) :: DataFingerprint -> DataFingerprint -> Bool # | |
| Ord DataFingerprint Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base Methods compare :: DataFingerprint -> DataFingerprint -> Ordering # (<) :: DataFingerprint -> DataFingerprint -> Bool # (<=) :: DataFingerprint -> DataFingerprint -> Bool # (>) :: DataFingerprint -> DataFingerprint -> Bool # (>=) :: DataFingerprint -> DataFingerprint -> Bool # max :: DataFingerprint -> DataFingerprint -> DataFingerprint # min :: DataFingerprint -> DataFingerprint -> DataFingerprint # | |
| Show DataFingerprint Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base Methods showsPrec :: Int -> DataFingerprint -> ShowS # show :: DataFingerprint -> String # showList :: [DataFingerprint] -> ShowS # | |
| Lift DataFingerprint Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base Methods lift :: DataFingerprint -> Q Exp # | |
data TypeWrapper Source #
Instances
| Eq TypeWrapper Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base | |
| Show TypeWrapper Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base Methods showsPrec :: Int -> TypeWrapper -> ShowS # show :: TypeWrapper -> String # showList :: [TypeWrapper] -> ShowS # | |
| Lift TypeWrapper Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base Methods lift :: TypeWrapper -> Q Exp # | |
Constructors
| TypeRef | |
Fields
| |
data DataEnumValue s Source #
Constructors
| DataEnumValue | |
Fields
| |
Instances
| Show (DataEnumValue s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem Methods showsPrec :: Int -> DataEnumValue s -> ShowS # show :: DataEnumValue s -> String # showList :: [DataEnumValue s] -> ShowS # | |
| Lift (DataEnumValue s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem Methods lift :: DataEnumValue s -> Q Exp # | |
| RenderGQL (DataEnumValue s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem Methods render :: DataEnumValue s -> Rendering Source # | |
data OperationType Source #
Constructors
| Query | |
| Subscription | |
| Mutation |
Instances
type SUBSCRIPTION = Subscription Source #
data Directive (s :: Stage) Source #
Constructors
| Directive | |
Fields | |
Constructors
| ConsD | |
Fields
| |
data TypeCategory Source #
type DataInputUnion s = [UnionMember IN s] Source #
data VariableContent (stage :: Stage) where Source #
Constructors
| DefaultValue :: Maybe ResolvedValue -> VariableContent CONST | |
| ValidVariableValue | |
Fields
| |
Instances
| Eq (VariableContent a) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Value Methods (==) :: VariableContent a -> VariableContent a -> Bool # (/=) :: VariableContent a -> VariableContent a -> Bool # | |
| Show (VariableContent a) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Value Methods showsPrec :: Int -> VariableContent a -> ShowS # show :: VariableContent a -> String # showList :: [VariableContent a] -> ShowS # | |
| Lift (VariableContent a) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Value Methods lift :: VariableContent a -> Q Exp # | |
initTypeLib :: TypeDefinition OBJECT s -> Schema s Source #
kindOf :: TypeDefinition a s -> TypeKind Source #
toNullable :: Nullable a => a -> a Source #
toListField :: FieldDefinition cat s -> FieldDefinition cat s Source #
toHSWrappers :: [DataTypeWrapper] -> [TypeWrapper] Source #
isNullable :: Nullable a => a -> Bool Source #
toGQLWrapper :: [TypeWrapper] -> [DataTypeWrapper] Source #
isWeaker :: [TypeWrapper] -> [TypeWrapper] -> Bool Source #
isSubscription :: TypeKind -> Bool Source #
isOutputObject :: TypeKind -> Bool Source #
isNotSystemTypeName :: TypeName -> Bool Source #
mkEnumContent :: ELEM LEAF a ~ TRUE => [TypeName] -> TypeContent TRUE a s Source #
createScalarType :: ELEM LEAF a ~ TRUE => TypeName -> TypeDefinition a s Source #
mkUnionContent :: [TypeName] -> TypeContent TRUE OUT s Source #
mkInputUnionFields :: TypeName -> [UnionMember IN s] -> FieldsDefinition IN s Source #
fieldVisibility :: FieldDefinition cat s -> Bool Source #
insertType :: (Monad m, Failure ValidationErrors m) => TypeDefinition cat s -> UpdateT m (Schema s) Source #
lookupWith :: Eq k => (a -> k) -> k -> [a] -> Maybe a Source #
hsTypeName :: TypeName -> TypeName Source #
Constructors
| GQLQuery | |
Fields
| |
unsafeFromFields :: [FieldDefinition cat s] -> FieldsDefinition cat s Source #
Instances
| (Eq k, Hashable k) => Selectable k a (OrdMap k a) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.OrdMap | |
| (NameCollision a, KeyOf k a, Hashable k) => Listable a (OrdMap k a) Source # | |
| (KeyOf k a, Hashable k) => Collection a (OrdMap k a) Source # | |
| Functor (OrdMap k) Source # | |
| (Eq k, Hashable k) => Foldable (OrdMap k) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.OrdMap Methods fold :: Monoid m => OrdMap k m -> m # foldMap :: Monoid m => (a -> m) -> OrdMap k a -> m # foldr :: (a -> b -> b) -> b -> OrdMap k a -> b # foldr' :: (a -> b -> b) -> b -> OrdMap k a -> b # foldl :: (b -> a -> b) -> b -> OrdMap k a -> b # foldl' :: (b -> a -> b) -> b -> OrdMap k a -> b # foldr1 :: (a -> a -> a) -> OrdMap k a -> a # foldl1 :: (a -> a -> a) -> OrdMap k a -> a # elem :: Eq a => a -> OrdMap k a -> Bool # maximum :: Ord a => OrdMap k a -> a # minimum :: Ord a => OrdMap k a -> a # | |
| (Eq k, Hashable k) => Traversable (OrdMap k) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.OrdMap | |
| (Eq k, Eq a) => Eq (OrdMap k a) Source # | |
| (Show k, Show a) => Show (OrdMap k a) Source # | |
| (Lift a, Lift k, Eq k, Hashable k) => Lift (OrdMap k a) Source # | |
| (NameCollision a, KeyOf k a) => Merge (OrdMap k a) Source # | |
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 # | |
| (LiftOperation o, Monad m) => Failure GQLErrors (Resolver o e 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.14.0-DVAWEySgEHXLULGJqXC6uS" 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 #
Constructors
| ObjectEntry | |
Fields
| |
Instances
| KeyOf FieldName (ObjectEntry s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Value Methods keyOf :: ObjectEntry s -> FieldName Source # | |
| Eq (ObjectEntry s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Value Methods (==) :: ObjectEntry s -> ObjectEntry s -> Bool # (/=) :: ObjectEntry s -> ObjectEntry s -> Bool # | |
| Show (ObjectEntry s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Value Methods showsPrec :: Int -> ObjectEntry s -> ShowS # show :: ObjectEntry s -> String # showList :: [ObjectEntry s] -> ShowS # | |
| Lift (ObjectEntry a) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Value Methods lift :: ObjectEntry a -> Q Exp # | |
| RenderGQL (ObjectEntry a) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Value Methods render :: ObjectEntry a -> Rendering Source # | |
Constructors
| UnionTag | |
Fields | |
updateSchema :: (Monad m, Failure ValidationErrors m) => TypeName -> DataFingerprint -> [UpdateT m (Schema s)] -> (a -> TypeDefinition cat s) -> a -> UpdateT m (Schema s) Source #
internalFingerprint :: TypeName -> [String] -> DataFingerprint Source #
type IMPLEMENTABLE = IMPLEMENTABLE Source #
toAny :: ToCategory a k ANY => a (k :: TypeCategory) (s :: Stage) -> a ANY s Source #
Constructors
| TypeName | |
Fields
| |
Instances
Minimal complete definition
Instances
| Msg ByteString Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base | |
| Msg Text Source # | |
| Msg Value Source # | |
| Msg String Source # | |
| Msg TypeRef 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 (Value a) Source # | |
| Msg (UnionMember cat s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem | |
toFieldName :: TypeName -> FieldName Source #
data TypeNameRef Source #
Constructors
| TypeNameRef | |
Fields | |
Instances
| Eq TypeNameRef Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base | |
| Show TypeNameRef Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base Methods showsPrec :: Int -> TypeNameRef -> ShowS # show :: TypeNameRef -> String # showList :: [TypeNameRef] -> ShowS # | |
| Lift TypeNameRef Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base Methods lift :: TypeNameRef -> Q Exp # | |
| KeyOf TypeName TypeNameRef Source # | |
Defined in Data.Morpheus.Internal.Utils Methods keyOf :: TypeNameRef -> TypeName Source # | |
Instances
mkConsEnum :: DataEnumValue s -> ConsD cat s Source #
type Directives s = [Directive s] Source #
type DirectiveDefinitions s = [DirectiveDefinition s] Source #
data DirectiveDefinition s Source #
Constructors
| DirectiveDefinition | |
Instances
| KeyOf FieldName (DirectiveDefinition s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Fields Methods keyOf :: DirectiveDefinition s -> FieldName Source # | |
| Selectable FieldName (ArgumentDefinition s) (DirectiveDefinition s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Fields Methods selectOr :: d -> (ArgumentDefinition s -> d) -> FieldName -> DirectiveDefinition s -> d Source # | |
| Show (DirectiveDefinition s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Fields Methods showsPrec :: Int -> DirectiveDefinition s -> ShowS # show :: DirectiveDefinition s -> String # showList :: [DirectiveDefinition s] -> ShowS # | |
| Lift (DirectiveDefinition s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Fields Methods lift :: DirectiveDefinition s -> Q Exp # | |
data DirectiveLocation Source #
Constructors
Instances
| Eq DirectiveLocation Source # | |
Defined in Data.Morpheus.Types.Internal.AST.DirectiveLocation Methods (==) :: DirectiveLocation -> DirectiveLocation -> Bool # (/=) :: DirectiveLocation -> DirectiveLocation -> Bool # | |
| Show DirectiveLocation Source # | |
Defined in Data.Morpheus.Types.Internal.AST.DirectiveLocation Methods showsPrec :: Int -> DirectiveLocation -> ShowS # show :: DirectiveLocation -> String # showList :: [DirectiveLocation] -> ShowS # | |
| Lift DirectiveLocation Source # | |
Defined in Data.Morpheus.Types.Internal.AST.DirectiveLocation Methods lift :: DirectiveLocation -> Q Exp # | |
| Msg DirectiveLocation Source # | |
data FieldContent (bool :: Bool) (cat :: TypeCategory) (s :: Stage) where Source #
Constructors
| DefaultInputValue | |
Fields
| |
| FieldArgs | |
Fields
| |
Instances
| ToCategory (FieldContent TRUE) a ANY Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Fields Methods toCategory :: FieldContent TRUE a s -> FieldContent TRUE ANY s Source # | |
| Show (FieldContent bool cat s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Fields Methods showsPrec :: Int -> FieldContent bool cat s -> ShowS # show :: FieldContent bool cat s -> String # showList :: [FieldContent bool cat s] -> ShowS # | |
| Lift (FieldContent bool cat s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Fields Methods lift :: FieldContent bool cat s -> Q Exp # | |
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 #
data TypeNameTH Source #
Constructors
| TypeNameTH | |
Instances
| Show TypeNameTH Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TH Methods showsPrec :: Int -> TypeNameTH -> ShowS # show :: TypeNameTH -> String # showList :: [TypeNameTH] -> ShowS # | |
mkObjectField :: ArgumentsDefinition s -> FieldName -> [TypeWrapper] -> TypeName -> FieldDefinition OUT s Source #
data UnionMember (cat :: TypeCategory) (s :: Stage) Source #
Constructors
| UnionMember | |
Fields
| |
Instances
| KeyOf TypeName (UnionMember cat s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem Methods keyOf :: UnionMember cat s -> TypeName Source # | |
| Eq (UnionMember cat s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem Methods (==) :: 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.TypeSystem Methods showsPrec :: Int -> UnionMember cat s -> ShowS # show :: UnionMember cat s -> String # showList :: [UnionMember cat s] -> ShowS # | |
| Lift (UnionMember cat s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem Methods lift :: UnionMember cat s -> Q Exp # | |
| RenderGQL (UnionMember cat s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem Methods render :: UnionMember cat s -> Rendering Source # | |
| Msg (UnionMember cat s) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem | |
mkUnionMember :: TypeName -> UnionMember cat s Source #
data RawTypeDefinition Source #
Constructors
| RawSchemaDefinition SchemaDefinition | |
| RawTypeDefinition (TypeDefinition ANY CONST) | |
| RawDirectiveDefinition (DirectiveDefinition CONST) |
Instances
| Show RawTypeDefinition Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem Methods showsPrec :: Int -> RawTypeDefinition -> ShowS # show :: RawTypeDefinition -> String # showList :: [RawTypeDefinition] -> ShowS # | |
data RootOperationTypeDefinition Source #
Constructors
| RootOperationTypeDefinition | |
Instances
| Eq RootOperationTypeDefinition Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem Methods (==) :: RootOperationTypeDefinition -> RootOperationTypeDefinition -> Bool # (/=) :: RootOperationTypeDefinition -> RootOperationTypeDefinition -> Bool # | |
| Show RootOperationTypeDefinition Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem Methods showsPrec :: Int -> RootOperationTypeDefinition -> ShowS # show :: RootOperationTypeDefinition -> String # showList :: [RootOperationTypeDefinition] -> ShowS # | |
| KeyOf OperationType RootOperationTypeDefinition Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem Methods keyOf :: RootOperationTypeDefinition -> OperationType Source # | |
| Selectable OperationType RootOperationTypeDefinition SchemaDefinition Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem Methods selectOr :: d -> (RootOperationTypeDefinition -> d) -> OperationType -> SchemaDefinition -> d Source # | |
type UnionSelection (s :: Stage) = MergeSet s UnionTag Source #
data SchemaDefinition Source #
Constructors
| SchemaDefinition | |
Instances
| Show SchemaDefinition Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem Methods showsPrec :: Int -> SchemaDefinition -> ShowS # show :: SchemaDefinition -> String # showList :: [SchemaDefinition] -> ShowS # | |
| KeyOf TypeName SchemaDefinition Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem Methods keyOf :: SchemaDefinition -> TypeName Source # | |
| Selectable OperationType RootOperationTypeDefinition SchemaDefinition Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem Methods selectOr :: d -> (RootOperationTypeDefinition -> d) -> OperationType -> SchemaDefinition -> d Source # | |
buildSchema :: (Monad m, Failure ValidationErrors m) => (Maybe SchemaDefinition, [TypeDefinition ANY s], [DirectiveDefinition s]) -> m (Schema s) Source #
newtype InternalError Source #
Constructors
| InternalError | |
Fields | |
Instances
data ValidationError Source #
Constructors
| ValidationError | |
Fields | |
Instances
| Show ValidationError Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base Methods showsPrec :: Int -> ValidationError -> ShowS # show :: ValidationError -> String # showList :: [ValidationError] -> ShowS # | |
| IsString ValidationError Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base Methods fromString :: String -> ValidationError # | |
| Semigroup ValidationError Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base Methods (<>) :: ValidationError -> ValidationError -> ValidationError # sconcat :: NonEmpty ValidationError -> ValidationError # stimes :: Integral b => b -> ValidationError -> ValidationError # | |
| (Stream s, Ord e, Failure GQLErrors m) => Failure ValidationErrors (ParsecT e s m) Source # | |
Defined in Data.Morpheus.Internal.Utils Methods failure :: ValidationErrors -> ParsecT e s m v Source # | |
| Failure [ValidationError] (Result ev) Source # | |
Defined in Data.Morpheus.Types.Internal.Resolving.Core Methods 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 perserving type information from untyped values see function typed
Constructors
| Typed a |
msgValidation :: Msg a => a -> ValidationError Source #
type ValidationErrors = [ValidationError] Source #
toGQLError :: ValidationError -> GQLError Source #
type family ELEM (elemKind :: TypeCategory) (setOfKind :: TypeCategory) :: Bool Source #
Instances
| type ELEM a ANY Source # | |
| type ELEM LEAF LEAF Source # | |
| type ELEM LEAF IMPLEMENTABLE Source # | |
| type ELEM LEAF OBJECT Source # | |
| type ELEM LEAF OUT Source # | |
| type ELEM LEAF IN Source # | |
| type ELEM IMPLEMENTABLE LEAF Source # | |
| type ELEM IMPLEMENTABLE IMPLEMENTABLE Source # | |
| type ELEM IMPLEMENTABLE OBJECT Source # | |
| type ELEM IMPLEMENTABLE OUT Source # | |
| type ELEM IMPLEMENTABLE IN Source # | |
| type ELEM OBJECT LEAF Source # | |
| type ELEM OBJECT IMPLEMENTABLE Source # | |
| type ELEM OBJECT OBJECT Source # | |
| type ELEM OBJECT OUT Source # | |
| type ELEM OBJECT IN Source # | |
| type ELEM ANY a Source # | |
| type ELEM OUT IMPLEMENTABLE Source # | |
| type ELEM OUT OBJECT Source # | |
| type ELEM OUT OUT Source # | |
| type ELEM OUT IN Source # | |
| type ELEM IN IMPLEMENTABLE Source # | |
| type ELEM IN OBJECT Source # | |
| type ELEM IN OUT Source # | |
| type ELEM IN IN Source # | |
type REQURE_IMPLEMENTABLE cat = ELEM cat IMPLEMENTABLE ~ TRUE Source #
class ToCategory a (k :: TypeCategory) (k' :: TypeCategory) where Source #
Methods
toCategory :: a k (s :: Stage) -> a k' s Source #
Instances
| ToCategory FieldDefinition a ANY Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Fields Methods toCategory :: FieldDefinition a s -> FieldDefinition ANY s Source # | |
| ToCategory (TypeContent TRUE) cat cat' => ToCategory TypeDefinition cat cat' Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem Methods toCategory :: TypeDefinition cat s -> TypeDefinition cat' s Source # | |
| ToCategory (FieldContent TRUE) a ANY Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Fields Methods toCategory :: FieldContent TRUE a s -> FieldContent TRUE ANY s Source # | |
| ToCategory (TypeContent TRUE) a ANY Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem Methods toCategory :: TypeContent TRUE a s -> TypeContent TRUE ANY s Source # | |
| ToCategory (TypeContent TRUE) OBJECT IMPLEMENTABLE Source # | |
Defined in Data.Morpheus.Types.Internal.AST.TypeSystem Methods toCategory :: TypeContent TRUE OBJECT s -> TypeContent TRUE IMPLEMENTABLE s Source # | |
class FromCategory a (k :: TypeCategory) (k' :: TypeCategory) where Source #
Methods
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 #