Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type Key = Text
- 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 (stage :: Stage) where
- data ScalarValue
- type Object a = OrderedMap (ObjectEntry 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
- type Named a = (Name, a)
- splitDuplicates :: Eq a => [a] -> ([a], [a])
- removeDuplicates :: Eq a => [a] -> [a]
- data Argument (valid :: Stage) = Argument {
- argumentName :: Name
- argumentValue :: Value valid
- argumentPosition :: Position
- type Arguments s = OrderedMap (Argument s)
- type SelectionSet s = MergeSet (Selection s)
- data SelectionContent (s :: Stage) where
- SelectionField :: SelectionContent s
- SelectionSet :: SelectionSet s -> SelectionContent s
- UnionSelection :: UnionSelection -> SelectionContent VALID
- data Selection (s :: Stage) where
- type Fragments = OrderedMap Fragment
- data Fragment = Fragment {}
- isOutputType :: DataTypeKind -> Bool
- data Operation (s :: Stage) = Operation {}
- data Variable (stage :: Stage) = Variable {
- variableName :: Name
- variableType :: TypeRef
- variablePosition :: Position
- variableValue :: VariableContent (VAR stage)
- type VariableDefinitions s = OrderedMap (Variable s)
- type DefaultValue = Maybe ResolvedValue
- getOperationName :: Maybe Key -> Key
- getOperationDataType :: Failure GQLErrors m => Operation a -> Schema -> m TypeDefinition
- newtype ScalarDefinition = ScalarDefinition {}
- type DataEnum = [DataEnumValue]
- newtype FieldsDefinition = FieldsDefinition {}
- type ArgumentDefinition = FieldDefinition
- type DataUnion = [Key]
- data ArgumentsDefinition
- data FieldDefinition = FieldDefinition {}
- newtype InputFieldsDefinition = InputFieldsDefinition {}
- data TypeContent
- = DataScalar { }
- | DataEnum { }
- | DataInputObject { }
- | DataObject { }
- | DataUnion { }
- | DataInputUnion {
- inputUnionMembers :: [(Key, Bool)]
- | DataInterface { }
- data TypeDefinition = TypeDefinition {}
- data Schema = Schema {}
- data DataTypeWrapper
- data DataTypeKind
- data DataFingerprint = DataFingerprint Name [String]
- data TypeWrapper
- data TypeRef = TypeRef {
- typeConName :: Name
- typeArgs :: Maybe Name
- typeWrappers :: [TypeWrapper]
- data DataEnumValue = DataEnumValue {}
- data OperationType
- type QUERY = Query
- type MUTATION = Mutation
- type SUBSCRIPTION = Subscription
- data Meta = Meta {}
- data Directive = Directive {}
- type TypeUpdater = LibUpdater Schema
- data TypeD = TypeD {}
- data ConsD = ConsD {
- cName :: Name
- cFields :: [FieldDefinition]
- data ClientQuery = ClientQuery {
- queryText :: String
- queryTypes :: [ClientType]
- queryArgsType :: Maybe TypeD
- data GQLTypeD = GQLTypeD {
- typeD :: TypeD
- typeKindD :: DataTypeKind
- typeArgD :: [TypeD]
- typeOriginal :: TypeDefinition
- data ClientType = ClientType {}
- type DataInputUnion = [(Key, Bool)]
- data VariableContent (stage :: Stage) where
- DefaultValue :: Maybe ResolvedValue -> VariableContent RESOLVED
- ValidVariableValue :: {..} -> VariableContent VALID
- type TypeLib = HashMap Key TypeDefinition
- isTypeDefined :: Key -> Schema -> Maybe DataFingerprint
- initTypeLib :: TypeDefinition -> Schema
- defineType :: TypeDefinition -> Schema -> Schema
- isFieldNullable :: FieldDefinition -> Bool
- allDataTypes :: Schema -> [TypeDefinition]
- lookupDataType :: Key -> Schema -> Maybe TypeDefinition
- kindOf :: TypeDefinition -> DataTypeKind
- toNullableField :: FieldDefinition -> FieldDefinition
- toListField :: FieldDefinition -> FieldDefinition
- 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
- isEntNode :: TypeContent -> Bool
- createField :: ArgumentsDefinition -> Key -> ([TypeWrapper], Key) -> FieldDefinition
- createArgument :: Key -> ([TypeWrapper], Key) -> FieldDefinition
- createDataTypeLib :: Failure Message m => [TypeDefinition] -> m Schema
- createEnumType :: Name -> [Key] -> TypeDefinition
- createScalarType :: Name -> TypeDefinition
- createType :: Key -> TypeContent -> TypeDefinition
- createUnionType :: Key -> [Key] -> TypeDefinition
- createAlias :: Key -> TypeRef
- createInputUnionFields :: Key -> [Key] -> [FieldDefinition]
- fieldVisibility :: FieldDefinition -> Bool
- createEnumValue :: Name -> DataEnumValue
- insertType :: TypeDefinition -> TypeUpdater
- lookupDeprecated :: Meta -> Maybe Directive
- lookupDeprecatedReason :: Directive -> Maybe Key
- hasArguments :: ArgumentsDefinition -> Bool
- lookupWith :: Eq k => (a -> k) -> k -> [a] -> Maybe a
- typeFromScalar :: Name -> Name
- toHSFieldDefinition :: FieldDefinition -> FieldDefinition
- hsTypeName :: Key -> Key
- data GQLQuery = GQLQuery {
- fragments :: Fragments
- operation :: Operation RAW
- inputVariables :: [(Key, ResolvedValue)]
- type Variables = Map Key ResolvedValue
- isNullableWrapper :: [TypeWrapper] -> Bool
- unsafeFromFields :: [FieldDefinition] -> FieldsDefinition
- unsafeFromInputFields :: [FieldDefinition] -> InputFieldsDefinition
- data OrderedMap a
- data GQLError = GQLError {}
- type GQLErrors = [GQLError]
- data ObjectEntry (s :: Stage) = ObjectEntry {
- entryName :: Name
- entryValue :: Value s
- data UnionTag = UnionTag {}
- isInputDataType :: TypeDefinition -> Bool
- __inputname :: Name
Documentation
Ref | |
|
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-0.11.0-DUiAk47SKcjJSZXaGm9hvY" 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 (stage :: Stage) where Source #
ResolvedVariable :: Ref -> Variable VALID -> Value RESOLVED | |
VariableValue :: Ref -> Value RAW | |
Object :: Object stage -> Value stage | |
List :: [Value stage] -> Value stage | |
Enum :: Name -> Value stage | |
Scalar :: ScalarValue -> Value stage | |
Null :: Value stage |
data ScalarValue Source #
Primitive Values for GQLScalar: ScalarValue
, ScalarValue
, ScalarValue
, Boolean
.
for performance reason type Text
represents GraphQl ScalarValue
value
Instances
type Object a = OrderedMap (ObjectEntry 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 #
splitDuplicates :: Eq a => [a] -> ([a], [a]) Source #
removeDuplicates :: Eq a => [a] -> [a] Source #
data Argument (valid :: Stage) Source #
Argument | |
|
type Arguments s = OrderedMap (Argument s) Source #
type SelectionSet s = MergeSet (Selection s) Source #
data SelectionContent (s :: Stage) where Source #
SelectionField :: SelectionContent s | |
SelectionSet :: SelectionSet s -> SelectionContent s | |
UnionSelection :: UnionSelection -> SelectionContent VALID |
Instances
Eq (SelectionContent a) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Selection (==) :: SelectionContent a -> SelectionContent a -> Bool # (/=) :: SelectionContent a -> SelectionContent a -> Bool # | |
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 # |
data Selection (s :: Stage) where Source #
Selection | |
| |
InlineFragment :: Fragment -> Selection RAW | |
Spread :: Ref -> Selection RAW |
type Fragments = OrderedMap Fragment Source #
isOutputType :: DataTypeKind -> Bool Source #
data Variable (stage :: Stage) Source #
Variable | |
|
type VariableDefinitions s = OrderedMap (Variable s) Source #
type DefaultValue = Maybe ResolvedValue Source #
getOperationDataType :: Failure GQLErrors m => Operation a -> Schema -> m TypeDefinition Source #
newtype ScalarDefinition Source #
Instances
Show ScalarDefinition Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data showsPrec :: Int -> ScalarDefinition -> ShowS # show :: ScalarDefinition -> String # showList :: [ScalarDefinition] -> ShowS # |
type DataEnum = [DataEnumValue] Source #
newtype FieldsDefinition Source #
Instances
Show FieldsDefinition Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data showsPrec :: Int -> FieldsDefinition -> ShowS # show :: FieldsDefinition -> String # showList :: [FieldsDefinition] -> ShowS # |
type ArgumentDefinition = FieldDefinition Source #
data ArgumentsDefinition Source #
Instances
Show ArgumentsDefinition Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data showsPrec :: Int -> ArgumentsDefinition -> ShowS # show :: ArgumentsDefinition -> String # showList :: [ArgumentsDefinition] -> ShowS # | |
Lift ArgumentsDefinition Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data lift :: ArgumentsDefinition -> Q Exp # |
data FieldDefinition Source #
Instances
Show FieldDefinition Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data showsPrec :: Int -> FieldDefinition -> ShowS # show :: FieldDefinition -> String # showList :: [FieldDefinition] -> ShowS # | |
Lift FieldDefinition Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data lift :: FieldDefinition -> Q Exp # |
newtype InputFieldsDefinition Source #
Instances
Show InputFieldsDefinition Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data showsPrec :: Int -> InputFieldsDefinition -> ShowS # show :: InputFieldsDefinition -> String # showList :: [InputFieldsDefinition] -> ShowS # |
data TypeContent Source #
DataScalar | |
DataEnum | |
DataInputObject | |
DataObject | |
DataUnion | |
DataInputUnion | |
| |
DataInterface | |
Instances
Show TypeContent Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data showsPrec :: Int -> TypeContent -> ShowS # show :: TypeContent -> String # showList :: [TypeContent] -> ShowS # |
data TypeDefinition Source #
TypeDefinition | |
|
Instances
Show TypeDefinition Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Data showsPrec :: Int -> TypeDefinition -> ShowS # show :: TypeDefinition -> String # showList :: [TypeDefinition] -> ShowS # |
data DataTypeWrapper Source #
Instances
Show DataTypeWrapper Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base showsPrec :: Int -> DataTypeWrapper -> ShowS # show :: DataTypeWrapper -> String # showList :: [DataTypeWrapper] -> ShowS # | |
Lift DataTypeWrapper Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base lift :: DataTypeWrapper -> Q Exp # |
data DataTypeKind Source #
KindScalar | |
KindObject (Maybe OperationType) | |
KindUnion | |
KindEnum | |
KindInputObject | |
KindList | |
KindNonNull | |
KindInputUnion |
Instances
Eq DataTypeKind Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base (==) :: DataTypeKind -> DataTypeKind -> Bool # (/=) :: DataTypeKind -> DataTypeKind -> Bool # | |
Show DataTypeKind Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base showsPrec :: Int -> DataTypeKind -> ShowS # show :: DataTypeKind -> String # showList :: [DataTypeKind] -> ShowS # | |
Lift DataTypeKind Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base lift :: DataTypeKind -> Q Exp # |
data DataFingerprint Source #
Instances
Eq DataFingerprint Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base (==) :: DataFingerprint -> DataFingerprint -> Bool # (/=) :: DataFingerprint -> DataFingerprint -> Bool # | |
Ord DataFingerprint Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base 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 showsPrec :: Int -> DataFingerprint -> ShowS # show :: DataFingerprint -> String # showList :: [DataFingerprint] -> ShowS # | |
Lift DataFingerprint Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base lift :: DataFingerprint -> Q Exp # |
data TypeWrapper Source #
Instances
Eq TypeWrapper Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base (==) :: TypeWrapper -> TypeWrapper -> Bool # (/=) :: TypeWrapper -> TypeWrapper -> Bool # | |
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 # |
data OperationType Source #
Instances
Eq OperationType Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base (==) :: OperationType -> OperationType -> Bool # (/=) :: OperationType -> OperationType -> Bool # | |
Show OperationType Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base showsPrec :: Int -> OperationType -> ShowS # show :: OperationType -> String # showList :: [OperationType] -> ShowS # | |
Lift OperationType Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base lift :: OperationType -> Q Exp # |
type SUBSCRIPTION = Subscription Source #
type TypeUpdater = LibUpdater Schema Source #
ConsD | |
|
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
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 # | |
Lift (VariableContent a) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Value lift :: VariableContent a -> Q Exp # |
isTypeDefined :: Key -> Schema -> Maybe DataFingerprint Source #
initTypeLib :: TypeDefinition -> Schema Source #
defineType :: TypeDefinition -> Schema -> Schema Source #
allDataTypes :: Schema -> [TypeDefinition] Source #
lookupDataType :: Key -> Schema -> Maybe TypeDefinition Source #
kindOf :: TypeDefinition -> DataTypeKind 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 #
isEntNode :: TypeContent -> Bool Source #
createField :: ArgumentsDefinition -> Key -> ([TypeWrapper], Key) -> FieldDefinition Source #
createArgument :: Key -> ([TypeWrapper], Key) -> FieldDefinition Source #
createDataTypeLib :: Failure Message m => [TypeDefinition] -> m Schema Source #
createEnumType :: Name -> [Key] -> TypeDefinition Source #
createType :: Key -> TypeContent -> TypeDefinition Source #
createUnionType :: Key -> [Key] -> TypeDefinition Source #
createAlias :: Key -> TypeRef Source #
createInputUnionFields :: Key -> [Key] -> [FieldDefinition] Source #
createEnumValue :: Name -> DataEnumValue Source #
lookupWith :: Eq k => (a -> k) -> k -> [a] -> Maybe a Source #
typeFromScalar :: Name -> Name Source #
hsTypeName :: Key -> Key Source #
GQLQuery | |
|
isNullableWrapper :: [TypeWrapper] -> Bool Source #
data OrderedMap a Source #
Instances
Instances
Show GQLError Source # | |
Generic GQLError Source # | |
ToJSON GQLError Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Base | |
FromJSON GQLError 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-0.11.0-DUiAk47SKcjJSZXaGm9hvY" 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
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 # | |
Lift (ObjectEntry a) Source # | |
Defined in Data.Morpheus.Types.Internal.AST.Value lift :: ObjectEntry a -> Q Exp # |
isInputDataType :: TypeDefinition -> Bool Source #
__inputname :: Name Source #