module Model.ServerObjectTypes where
type RootObjects = [RootObject]
type RootObject = NestedObject
data NestedObject = NestedObject !Alias !Name !ServerObject !SubSelection !SubFields
deriving Show
type Alias = Maybe String
type ServerObject = String
type SubSelection = Maybe ScalarType
type SubFields = [Field]
type Field = Either ScalarType FieldObject
type FieldObject = Either NestedObject InlinefragmentObject
data InlinefragmentObject = InlinefragmentObject !ServerObject !SubFields
deriving Show
data ScalarType = ScalarType !Alias !Name !Transformation !Argument
deriving (Show,Eq)
type Transformation = Maybe String
type Argument = Maybe String
type Name = String
data Fragment = Fragment
{ name :: String
, targetObject :: ServerObject
, replacement :: String
}
type SchemaSpecs = ([(String,[String])],[(String,[(String,String,[(String,[(String,String,String,String)])])])],[(String,[(String,[String])])],[(String,[String],String)],[(String,String,[String])],[(String,[String],[String])])
type QueryData = [(RootObject,[[String]])]