Module

Dev.Server

Package
purescript-prospero
Repository
rowtype-yoga/purescript-prospero

#appLayer Source

appLayer :: OmLayer (scope :: Scope) Errs { characterRepo :: CharacterRepo, characterTable :: CharacterTable, server :: Fastify }

#ServerL Source

type ServerL :: Row Type -> Row Typetype ServerL r = (server :: Fastify | r)

#serverLayer Source

#Ctx Source

type Ctx = { characterRepo :: CharacterRepo }

#Errs Source

type Errs :: Row Typetype Errs = (wrongArgumentType :: String)

#schema Source

schema :: forall gql. GraphQL Ctx Errs gql

#handleErrors Source

handleErrors :: forall a. { exception :: Error -> Aff a, wrongArgumentType :: String -> Aff a }

#CharacterRepo Source

type CharacterRepo = { findAll :: Aff (Array Character), findByName :: String -> Aff (Maybe Character) }

#CharacterRepoL Source

type CharacterRepoL :: Row Type -> Row Typetype CharacterRepoL r = (characterRepo :: CharacterRepo | r)

#characterRepoLayer Source

#CharacterTable Source

#CharacterTableL Source

type CharacterTableL :: Row Type -> Row Typetype CharacterTableL r = (characterTable :: CharacterTable | r)

#characterTableLayer Source