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 = RAW
- type RAW = VALID
- 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
- 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 -> DataTypeLib -> Validation DataType
- getOperationObject :: Operation a -> DataTypeLib -> 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
- data DataType = DataType {}
- data DataTypeLib = DataTypeLib {}
- data DataTypeWrapper
- newtype DataValidator = DataValidator {}
- data DataTypeKind
- data DataFingerprint = DataFingerprint Name [String]
- data RawDataType
- = FinalDataType DataType
- | Interface { }
- | Implements { }
- data ResolverKind
- data TypeWrapper
- data TypeRef = TypeRef {
- typeConName :: Name
- typeArgs :: Maybe Name
- typeWrappers :: [TypeWrapper]
- data ArgsType = ArgsType {}
- data DataEnumValue = DataEnumValue {}
- isTypeDefined :: Key -> DataTypeLib -> Maybe DataFingerprint
- initTypeLib :: (Key, DataType) -> DataTypeLib
- defineType :: (Key, DataType) -> DataTypeLib -> DataTypeLib
- isFieldNullable :: DataField -> Bool
- allDataTypes :: DataTypeLib -> [(Key, DataType)]
- lookupDataType :: Key -> DataTypeLib -> 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 -> DataTypeLib -> e -> m DataType
- coerceDataObject :: Failure error m => error -> DataType -> m (Name, DataObject)
- getDataType :: Failure error m => Key -> DataTypeLib -> error -> m DataType
- lookupDataObject :: (Monad m, Failure e m) => e -> Key -> DataTypeLib -> m (Name, DataObject)
- lookupDataUnion :: (Monad m, Failure e m) => e -> Key -> DataTypeLib -> m DataUnion
- lookupType :: Failure e m => e -> [(Key, a)] -> Key -> m a
- lookupField :: Failure error m => Key -> [(Key, field)] -> error -> m field
- lookupUnionTypes :: (Monad m, Failure GQLErrors m) => Position -> Key -> DataTypeLib -> DataField -> m [(Name, DataObject)]
- lookupSelectionField :: Failure GQLErrors Validation => Position -> Name -> Name -> DataObject -> Validation DataField
- lookupFieldAsSelectionSet :: (Monad m, Failure GQLErrors m) => Position -> Key -> DataTypeLib -> DataField -> m (Name, DataObject)
- createField :: DataArguments -> Key -> ([TypeWrapper], Key) -> DataField
- createArgument :: Key -> ([TypeWrapper], Key) -> (Key, DataField)
- createDataTypeLib :: [(Key, DataType)] -> Validation DataTypeLib
- 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 DataTypeLib
- 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
- 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.8.0-GqQbC5VkuucF3CVtmsv1IY" 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 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 #
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 #
getOperationDataType :: Operation a -> DataTypeLib -> Validation DataType Source #
getOperationObject :: Operation a -> DataTypeLib -> 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 #
data DataTypeContent Source #
DataScalar DataScalar | |
DataEnum DataEnum | |
DataInputObject DataObject | |
DataObject DataObject | |
DataUnion DataUnion | |
DataInputUnion [(Key, Bool)] |
Instances
Show DataTypeContent Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data showsPrec :: Int -> DataTypeContent -> ShowS # show :: DataTypeContent -> String # showList :: [DataTypeContent] -> ShowS # |
data DataTypeLib Source #
Instances
Show DataTypeLib Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data showsPrec :: Int -> DataTypeLib -> ShowS # show :: DataTypeLib -> String # showList :: [DataTypeLib] -> ShowS # |
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 RawDataType Source #
Instances
Show RawDataType Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data showsPrec :: Int -> RawDataType -> ShowS # show :: RawDataType -> String # showList :: [RawDataType] -> ShowS # |
data ResolverKind Source #
Instances
Eq ResolverKind Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data (==) :: ResolverKind -> ResolverKind -> Bool # (/=) :: ResolverKind -> ResolverKind -> Bool # | |
Show ResolverKind Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data showsPrec :: Int -> ResolverKind -> ShowS # show :: ResolverKind -> String # showList :: [ResolverKind] -> ShowS # | |
Lift ResolverKind Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data lift :: ResolverKind -> 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 -> DataTypeLib -> Maybe DataFingerprint Source #
initTypeLib :: (Key, DataType) -> DataTypeLib Source #
defineType :: (Key, DataType) -> DataTypeLib -> DataTypeLib Source #
isFieldNullable :: DataField -> Bool Source #
allDataTypes :: DataTypeLib -> [(Key, DataType)] Source #
lookupDataType :: Key -> DataTypeLib -> Maybe DataType 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 #
lookupInputType :: Failure e m => Key -> DataTypeLib -> e -> m DataType Source #
coerceDataObject :: Failure error m => error -> DataType -> m (Name, DataObject) Source #
getDataType :: Failure error m => Key -> DataTypeLib -> error -> m DataType Source #
lookupDataObject :: (Monad m, Failure e m) => e -> Key -> DataTypeLib -> m (Name, DataObject) Source #
lookupDataUnion :: (Monad m, Failure e m) => e -> Key -> DataTypeLib -> m DataUnion Source #
lookupType :: Failure e m => e -> [(Key, a)] -> Key -> m a Source #
lookupField :: Failure error m => Key -> [(Key, field)] -> error -> m field Source #
lookupUnionTypes :: (Monad m, Failure GQLErrors m) => Position -> Key -> DataTypeLib -> DataField -> m [(Name, DataObject)] Source #
lookupSelectionField :: Failure GQLErrors Validation => Position -> Name -> Name -> DataObject -> Validation DataField Source #
lookupFieldAsSelectionSet :: (Monad m, Failure GQLErrors m) => Position -> Key -> DataTypeLib -> DataField -> m (Name, DataObject) Source #
createField :: DataArguments -> Key -> ([TypeWrapper], Key) -> DataField Source #
createArgument :: Key -> ([TypeWrapper], Key) -> (Key, DataField) Source #
createDataTypeLib :: [(Key, DataType)] -> Validation DataTypeLib Source #
createType :: Key -> DataTypeContent -> DataType Source #
createAlias :: Key -> TypeRef Source #
Directive | |
|
createEnumValue :: Key -> DataEnumValue Source #
insertType :: (Key, DataType) -> TypeUpdater Source #
type TypeUpdater = LibUpdater DataTypeLib 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 # |
GQLQuery | |
|
isNullableWrapper :: [TypeWrapper] -> Bool Source #