Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type Key = Text
- type Collection a = [(Key, a)]
- data Ref = Ref {
- refName :: Key
- refPosition :: Position
- data Position = Position {}
- type Message = Text
- anonymousRef :: Key -> Ref
- type Name = Key
- type Description = Key
- data Stage
- type RESOLVED = RESOLVED
- type VALID = VALID
- type RAW = RAW
- data VALIDATION_MODE
- data Value (valid :: Stage) where
- data ScalarValue
- type Object a = Collection (Value a)
- class GQLValue a where
- gqlNull :: a
- gqlScalar :: ScalarValue -> a
- gqlBoolean :: Bool -> a
- gqlString :: Text -> a
- gqlList :: [a] -> a
- gqlObject :: [(Name, a)] -> a
- replaceValue :: Value -> Value a
- decodeScientific :: Scientific -> ScalarValue
- convertToJSONName :: Text -> Text
- convertToHaskellName :: Text -> Text
- type RawValue = Value RAW
- type ValidValue = Value VALID
- type RawObject = Object RAW
- type ValidObject = Object VALID
- type ResolvedObject = Object RESOLVED
- type ResolvedValue = Value RESOLVED
- unpackInputUnion :: [(Name, Bool)] -> Object stage -> Either Message (Name, Maybe (Value stage))
- data Argument (valid :: Stage) = Argument {
- argumentValue :: Value valid
- argumentPosition :: Position
- type Arguments a = Collection (Argument a)
- type SelectionSet a = Collection (Selection a)
- data SelectionContent (valid :: Stage) where
- SelectionField :: SelectionContent valid
- SelectionSet :: SelectionSet valid -> SelectionContent valid
- UnionSelection :: UnionSelection -> SelectionContent VALID
- type ValidSelection = Selection VALID
- data Selection (valid :: Stage) where
- type RawSelection = Selection RAW
- type FragmentLib = [(Key, Fragment)]
- type RawArguments = Arguments RAW
- type RawSelectionSet = Collection RawSelection
- data Fragment = Fragment {}
- type RawArgument = Argument RAW
- type ValidSelectionSet = Collection ValidSelection
- type ValidArgument = Argument VALID
- type ValidArguments = Collection ValidArgument
- type RawSelectionRec = SelectionContent RAW
- type ValidSelectionRec = SelectionContent VALID
- isOutputType :: DataTypeKind -> Bool
- data Operation (stage :: Stage) = Operation {
- operationName :: Maybe Key
- operationType :: OperationType
- operationArguments :: Collection (Variable stage)
- operationSelection :: SelectionSet stage
- operationPosition :: Position
- data Variable (stage :: Stage) = Variable {
- variableType :: TypeRef
- variablePosition :: Position
- variableValue :: VariableContent (VAR stage)
- type ValidOperation = Operation VALID
- type RawOperation = Operation RAW
- type VariableDefinitions = Collection (Variable RAW)
- type ValidVariables = Collection (Variable VALID)
- type DefaultValue = Maybe ResolvedValue
- getOperationName :: Maybe Key -> Key
- getOperationDataType :: Operation a -> Schema -> Validation DataType
- getOperationObject :: Operation a -> Schema -> Validation (Name, DataObject)
- type DataScalar = DataValidator
- type DataEnum = [DataEnumValue]
- type DataObject = [(Key, DataField)]
- type DataArgument = DataField
- type DataUnion = [Key]
- type DataArguments = [(Key, DataArgument)]
- data DataField = DataField {}
- data DataTypeContent
- = DataScalar { }
- | DataEnum { }
- | DataInputObject { }
- | DataObject { }
- | DataUnion { }
- | DataInputUnion {
- inputUnionMembers :: [(Key, Bool)]
- | DataInterface { }
- data DataType = DataType {}
- data Schema = Schema {}
- data DataTypeWrapper
- newtype DataValidator = DataValidator {}
- data DataTypeKind
- data DataFingerprint = DataFingerprint Name [String]
- data TypeWrapper
- data TypeRef = TypeRef {
- typeConName :: Name
- typeArgs :: Maybe Name
- typeWrappers :: [TypeWrapper]
- data DataEnumValue = DataEnumValue {}
- isTypeDefined :: Key -> Schema -> Maybe DataFingerprint
- initTypeLib :: (Key, DataType) -> Schema
- defineType :: (Key, DataType) -> Schema -> Schema
- isFieldNullable :: DataField -> Bool
- allDataTypes :: Schema -> [(Key, DataType)]
- lookupDataType :: Key -> Schema -> Maybe DataType
- kindOf :: DataType -> DataTypeKind
- toNullableField :: DataField -> DataField
- toListField :: DataField -> DataField
- isObject :: DataTypeKind -> Bool
- isInput :: DataTypeKind -> Bool
- toHSWrappers :: [DataTypeWrapper] -> [TypeWrapper]
- isNullable :: TypeRef -> Bool
- toGQLWrapper :: [TypeWrapper] -> [DataTypeWrapper]
- isWeaker :: [TypeWrapper] -> [TypeWrapper] -> Bool
- isSubscription :: DataTypeKind -> Bool
- isOutputObject :: DataTypeKind -> Bool
- sysTypes :: [Key]
- isDefaultTypeName :: Key -> Bool
- isSchemaTypeName :: Key -> Bool
- isPrimitiveTypeName :: Key -> Bool
- data OperationType
- type QUERY = Query
- type MUTATION = Mutation
- type SUBSCRIPTION = Subscription
- isEntNode :: DataTypeContent -> Bool
- lookupInputType :: Failure e m => Key -> Schema -> e -> m DataType
- coerceDataObject :: Failure error m => error -> DataType -> m (Name, DataObject)
- lookupDataUnion :: (Monad m, Failure e m) => e -> Key -> Schema -> m DataUnion
- lookupField :: Failure error m => Key -> [(Key, field)] -> error -> m field
- lookupUnionTypes :: (Monad m, Failure GQLErrors m) => Position -> Key -> Schema -> DataField -> m [(Name, DataObject)]
- lookupSelectionField :: Failure GQLErrors Validation => Position -> Name -> Name -> DataObject -> Validation DataField
- lookupFieldAsSelectionSet :: (Monad m, Failure GQLErrors m) => Position -> Key -> Schema -> DataField -> m (Name, DataObject)
- createField :: DataArguments -> Key -> ([TypeWrapper], Key) -> DataField
- createArgument :: Key -> ([TypeWrapper], Key) -> (Key, DataField)
- createDataTypeLib :: [(Key, DataType)] -> Validation Schema
- createEnumType :: Key -> [Key] -> (Key, DataType)
- createScalarType :: Key -> (Key, DataType)
- createType :: Key -> DataTypeContent -> DataType
- createUnionType :: Key -> [Key] -> (Key, DataType)
- createAlias :: Key -> TypeRef
- createInputUnionFields :: Key -> [Key] -> [(Key, DataField)]
- fieldVisibility :: (Key, DataField) -> Bool
- data Meta = Meta {}
- data Directive = Directive {
- directiveName :: Name
- directiveArgs :: [(Name, ValidValue)]
- createEnumValue :: Key -> DataEnumValue
- insertType :: (Key, DataType) -> TypeUpdater
- type TypeUpdater = LibUpdater Schema
- lookupDeprecated :: Meta -> Maybe Directive
- lookupDeprecatedReason :: Directive -> Maybe Key
- data TypeD = TypeD {}
- data ConsD = ConsD {}
- data ClientQuery = ClientQuery {
- queryText :: String
- queryTypes :: [ClientType]
- queryArgsType :: Maybe TypeD
- data GQLTypeD = GQLTypeD {
- typeD :: TypeD
- typeKindD :: DataTypeKind
- typeArgD :: [TypeD]
- typeOriginal :: (Name, DataType)
- data ClientType = ClientType {}
- type DataInputUnion = [(Key, Bool)]
- data VariableContent (stage :: Stage) where
- DefaultValue :: Maybe ResolvedValue -> VariableContent RESOLVED
- ValidVariableValue :: {..} -> VariableContent VALID
- checkForUnknownKeys :: Failure e m => [Ref] -> [Name] -> ([Ref] -> e) -> m [Ref]
- checkNameCollision :: (Failure e m, Ord a) => [a] -> ([a] -> e) -> m [a]
- class DataLookup l a where
- lookupResult :: (Failure e m, Monad m) => e -> Name -> l -> m a
- data GQLQuery = GQLQuery {
- fragments :: FragmentLib
- operation :: RawOperation
- inputVariables :: [(Key, ResolvedValue)]
- type Variables = Map Key ResolvedValue
- isNullableWrapper :: [TypeWrapper] -> Bool
Documentation
type Collection a = [(Key, a)] Source #
Ref | |
|
Instances
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-0.9.0-Enb7NwejdImAguE6LnqUfW" False) (C1 (MetaCons "Position" PrefixI True) (S1 (MetaSel (Just "line") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int) :*: S1 (MetaSel (Just "column") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int))) |
anonymousRef :: Key -> Ref Source #
type Description = Key Source #
data VALIDATION_MODE Source #
Instances
Eq VALIDATION_MODE Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base (==) :: VALIDATION_MODE -> VALIDATION_MODE -> Bool # (/=) :: VALIDATION_MODE -> VALIDATION_MODE -> Bool # | |
Show VALIDATION_MODE Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base showsPrec :: Int -> VALIDATION_MODE -> ShowS # show :: VALIDATION_MODE -> String # showList :: [VALIDATION_MODE] -> ShowS # |
data Value (valid :: Stage) where Source #
ResolvedVariable :: Ref -> Variable VALID -> Value RESOLVED | |
VariableValue :: Ref -> Value RAW | |
Object :: Object a -> Value a | |
List :: [Value a] -> Value a | |
Enum :: Name -> Value a | |
Scalar :: ScalarValue -> Value a | |
Null :: Value a |
data ScalarValue Source #
Primitive Values for GQLScalar: ScalarValue
, ScalarValue
, ScalarValue
, Boolean
.
for performance reason type Text
represents GraphQl ScalarValue
value
Instances
type Object a = Collection (Value a) Source #
class GQLValue a where Source #
gqlScalar :: ScalarValue -> a Source #
gqlBoolean :: Bool -> a Source #
replaceValue :: Value -> Value a Source #
convertToJSONName :: Text -> Text Source #
convertToHaskellName :: Text -> Text Source #
type ValidValue = Value VALID Source #
type ValidObject = Object VALID Source #
type ResolvedObject = Object RESOLVED Source #
type ResolvedValue = Value RESOLVED Source #
unpackInputUnion :: [(Name, Bool)] -> Object stage -> Either Message (Name, Maybe (Value stage)) Source #
data Argument (valid :: Stage) Source #
Argument | |
|
type Arguments a = Collection (Argument a) Source #
type SelectionSet a = Collection (Selection a) Source #
data SelectionContent (valid :: Stage) where Source #
SelectionField :: SelectionContent valid | |
SelectionSet :: SelectionSet valid -> SelectionContent valid | |
UnionSelection :: UnionSelection -> SelectionContent VALID |
Instances
Show (SelectionContent a) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Selection 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 lift :: SelectionContent a -> Q Exp # |
type ValidSelection = Selection VALID Source #
data Selection (valid :: Stage) where Source #
Selection | |
| |
InlineFragment :: Fragment -> Selection RAW | |
Spread :: Ref -> Selection RAW |
type RawSelection = Selection RAW Source #
type FragmentLib = [(Key, Fragment)] Source #
type RawArguments = Arguments RAW Source #
type RawSelectionSet = Collection RawSelection Source #
type RawArgument = Argument RAW Source #
type ValidArgument = Argument VALID Source #
type ValidArguments = Collection ValidArgument Source #
type RawSelectionRec = SelectionContent RAW Source #
isOutputType :: DataTypeKind -> Bool Source #
data Operation (stage :: Stage) Source #
Operation | |
|
data Variable (stage :: Stage) Source #
Variable | |
|
type ValidOperation = Operation VALID Source #
type RawOperation = Operation RAW Source #
type VariableDefinitions = Collection (Variable RAW) Source #
type ValidVariables = Collection (Variable VALID) Source #
type DefaultValue = Maybe ResolvedValue Source #
getOperationObject :: Operation a -> Schema -> Validation (Name, DataObject) Source #
type DataScalar = DataValidator Source #
type DataEnum = [DataEnumValue] Source #
type DataObject = [(Key, DataField)] Source #
type DataArgument = DataField Source #
type DataArguments = [(Key, DataArgument)] Source #
Instances
Show DataField Source # | |
Lift DataField Source # | |
DataLookup Schema (Name, DataObject) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data lookupResult :: (Failure e m, Monad m) => e -> Name -> Schema -> m (Name, DataObject) Source # |
data DataTypeContent Source #
DataScalar | |
DataEnum | |
DataInputObject | |
DataObject | |
| |
DataUnion | |
DataInputUnion | |
| |
DataInterface | |
Instances
Show DataTypeContent Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data showsPrec :: Int -> DataTypeContent -> ShowS # show :: DataTypeContent -> String # showList :: [DataTypeContent] -> ShowS # |
Instances
Show DataType Source # | |
DataLookup Schema DataType Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data |
Instances
Show Schema Source # | |
DataLookup Schema DataType Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data | |
DataLookup Schema (Name, DataObject) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data lookupResult :: (Failure e m, Monad m) => e -> Name -> Schema -> m (Name, DataObject) Source # |
data DataTypeWrapper Source #
Instances
Show DataTypeWrapper Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data showsPrec :: Int -> DataTypeWrapper -> ShowS # show :: DataTypeWrapper -> String # showList :: [DataTypeWrapper] -> ShowS # | |
Lift DataTypeWrapper Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data lift :: DataTypeWrapper -> Q Exp # |
newtype DataValidator Source #
Instances
Show DataValidator Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data showsPrec :: Int -> DataValidator -> ShowS # show :: DataValidator -> String # showList :: [DataValidator] -> ShowS # |
data DataTypeKind Source #
KindScalar | |
KindObject (Maybe OperationType) | |
KindUnion | |
KindEnum | |
KindInputObject | |
KindList | |
KindNonNull | |
KindInputUnion |
Instances
Eq DataTypeKind Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data (==) :: DataTypeKind -> DataTypeKind -> Bool # (/=) :: DataTypeKind -> DataTypeKind -> Bool # | |
Show DataTypeKind Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data showsPrec :: Int -> DataTypeKind -> ShowS # show :: DataTypeKind -> String # showList :: [DataTypeKind] -> ShowS # | |
Lift DataTypeKind Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data lift :: DataTypeKind -> Q Exp # |
data DataFingerprint Source #
Instances
Eq DataFingerprint Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data (==) :: DataFingerprint -> DataFingerprint -> Bool # (/=) :: DataFingerprint -> DataFingerprint -> Bool # | |
Ord DataFingerprint Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data 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.Data showsPrec :: Int -> DataFingerprint -> ShowS # show :: DataFingerprint -> String # showList :: [DataFingerprint] -> ShowS # | |
Lift DataFingerprint Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data lift :: DataFingerprint -> Q Exp # |
data TypeWrapper Source #
Instances
Show TypeWrapper Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base showsPrec :: Int -> TypeWrapper -> ShowS # show :: TypeWrapper -> String # showList :: [TypeWrapper] -> ShowS # | |
Lift TypeWrapper Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base lift :: TypeWrapper -> Q Exp # |
TypeRef | |
|
data DataEnumValue Source #
Instances
Show DataEnumValue Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data showsPrec :: Int -> DataEnumValue -> ShowS # show :: DataEnumValue -> String # showList :: [DataEnumValue] -> ShowS # | |
Lift DataEnumValue Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data lift :: DataEnumValue -> Q Exp # |
isTypeDefined :: Key -> Schema -> Maybe DataFingerprint Source #
isFieldNullable :: DataField -> Bool Source #
kindOf :: DataType -> DataTypeKind Source #
toNullableField :: DataField -> DataField Source #
toListField :: DataField -> DataField Source #
isObject :: DataTypeKind -> Bool Source #
isInput :: DataTypeKind -> Bool Source #
toHSWrappers :: [DataTypeWrapper] -> [TypeWrapper] Source #
isNullable :: TypeRef -> Bool Source #
toGQLWrapper :: [TypeWrapper] -> [DataTypeWrapper] Source #
isWeaker :: [TypeWrapper] -> [TypeWrapper] -> Bool Source #
isSubscription :: DataTypeKind -> Bool Source #
isOutputObject :: DataTypeKind -> Bool Source #
isDefaultTypeName :: Key -> Bool Source #
isSchemaTypeName :: Key -> Bool Source #
isPrimitiveTypeName :: Key -> Bool Source #
data OperationType Source #
Instances
Eq OperationType Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data (==) :: OperationType -> OperationType -> Bool # (/=) :: OperationType -> OperationType -> Bool # | |
Show OperationType Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data showsPrec :: Int -> OperationType -> ShowS # show :: OperationType -> String # showList :: [OperationType] -> ShowS # | |
Lift OperationType Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data lift :: OperationType -> Q Exp # |
type SUBSCRIPTION = Subscription Source #
isEntNode :: DataTypeContent -> Bool Source #
coerceDataObject :: Failure error m => error -> DataType -> m (Name, DataObject) Source #
lookupField :: Failure error m => Key -> [(Key, field)] -> error -> m field Source #
lookupUnionTypes :: (Monad m, Failure GQLErrors m) => Position -> Key -> Schema -> DataField -> m [(Name, DataObject)] Source #
lookupSelectionField :: Failure GQLErrors Validation => Position -> Name -> Name -> DataObject -> Validation DataField Source #
lookupFieldAsSelectionSet :: (Monad m, Failure GQLErrors m) => Position -> Key -> Schema -> DataField -> m (Name, DataObject) Source #
createField :: DataArguments -> Key -> ([TypeWrapper], Key) -> DataField Source #
createArgument :: Key -> ([TypeWrapper], Key) -> (Key, DataField) Source #
createType :: Key -> DataTypeContent -> DataType Source #
createAlias :: Key -> TypeRef Source #
Directive | |
|
createEnumValue :: Key -> DataEnumValue Source #
insertType :: (Key, DataType) -> TypeUpdater Source #
type TypeUpdater = LibUpdater Schema Source #
data ClientQuery Source #
ClientQuery | |
|
Instances
Show ClientQuery Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data showsPrec :: Int -> ClientQuery -> ShowS # show :: ClientQuery -> String # showList :: [ClientQuery] -> ShowS # |
GQLTypeD | |
|
data ClientType Source #
Instances
Show ClientType Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data showsPrec :: Int -> ClientType -> ShowS # show :: ClientType -> String # showList :: [ClientType] -> ShowS # |
type DataInputUnion = [(Key, Bool)] Source #
data VariableContent (stage :: Stage) where Source #
DefaultValue :: Maybe ResolvedValue -> VariableContent RESOLVED | |
ValidVariableValue | |
|
Instances
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 # | |
Lift (VariableContent a) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Value lift :: VariableContent a -> Q Exp # |
checkNameCollision :: (Failure e m, Ord a) => [a] -> ([a] -> e) -> m [a] Source #
class DataLookup l a where Source #
lookupResult :: (Failure e m, Monad m) => e -> Name -> l -> m a Source #
Instances
DataLookup Schema DataType Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data | |
DataLookup Schema (Name, DataObject) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data lookupResult :: (Failure e m, Monad m) => e -> Name -> Schema -> m (Name, DataObject) Source # |
GQLQuery | |
|
isNullableWrapper :: [TypeWrapper] -> Bool Source #