graphql-api-0.2.0: Sketch of GraphQL stuff

Safe HaskellNone
LanguageHaskell2010

GraphQL.Internal.Syntax.AST

Synopsis

Documentation

unsafeMakeName :: HasCallStack => Text -> Name Source #

Create a Name, panicking if the given text is invalid.

Prefer makeName to this in all cases.

>>> unsafeMakeName "foo"
Name {unName = "foo"}

makeName :: Text -> Either NameError Name Source #

Create a Name.

Names must match the regex [_A-Za-z][_0-9A-Za-z]*. If the given text does not match, return Nothing.

>>> makeName "foo"
Right (Name {unName = "foo"})
>>> makeName "9-bar"
Left (NameError "9-bar")

data Node Source #

Instances

Eq Node Source # 

Methods

(==) :: Node -> Node -> Bool #

(/=) :: Node -> Node -> Bool #

Show Node Source # 

Methods

showsPrec :: Int -> Node -> ShowS #

show :: Node -> String #

showList :: [Node] -> ShowS #

data Field Source #

Instances

Eq Field Source # 

Methods

(==) :: Field -> Field -> Bool #

(/=) :: Field -> Field -> Bool #

Show Field Source # 

Methods

showsPrec :: Int -> Field -> ShowS #

show :: Field -> String #

showList :: [Field] -> ShowS #

data Type Source #

Instances

Eq Type Source # 

Methods

(==) :: Type -> Type -> Bool #

(/=) :: Type -> Type -> Bool #

Ord Type Source # 

Methods

compare :: Type -> Type -> Ordering #

(<) :: Type -> Type -> Bool #

(<=) :: Type -> Type -> Bool #

(>) :: Type -> Type -> Bool #

(>=) :: Type -> Type -> Bool #

max :: Type -> Type -> Type #

min :: Type -> Type -> Type #

Show Type Source # 

Methods

showsPrec :: Int -> Type -> ShowS #

show :: Type -> String #

showList :: [Type] -> ShowS #