Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- sessionVariableToGraphQLName :: SessionVariable -> Maybe Name
- filterSessionVariables :: (SessionVariable -> SessionVariableValue -> Bool) -> SessionVariables -> SessionVariables
- mkSessionVariablesHeaders :: [Header] -> SessionVariables
- sessionVariablesToHeaders :: SessionVariables -> [Header]
- getSessionVariables :: SessionVariables -> [Text]
- getSessionVariablesSet :: SessionVariables -> HashSet SessionVariable
- getSessionVariableValue :: SessionVariable -> SessionVariables -> Maybe SessionVariableValue
- data UserAdminSecret
- askCurRole :: UserInfoM m => m RoleName
- mkUserInfo :: forall m. MonadError QErr m => UserRoleBuild -> UserAdminSecret -> SessionVariables -> m UserInfo
- maybeRoleFromSessionVariables :: SessionVariables -> Maybe RoleName
- adminUserInfo :: UserInfo
Documentation
sessionVariableToGraphQLName :: SessionVariable -> Maybe Name Source #
Converts a SessionVariable
value to a GraphQL name.
This will fail if the session variable contains characters that are not valid
for a graphql names. It is the caller's responsibility to decide what to do
in such a case.
filterSessionVariables :: (SessionVariable -> SessionVariableValue -> Bool) -> SessionVariables -> SessionVariables Source #
getSessionVariables :: SessionVariables -> [Text] Source #
getSessionVariableValue :: SessionVariable -> SessionVariables -> Maybe SessionVariableValue Source #
data UserAdminSecret Source #
Represent the admin secret state; whether the secret is sent in the request or if actually authorization is not configured.
Instances
Show UserAdminSecret Source # | |
Defined in Hasura.Session showsPrec :: Int -> UserAdminSecret -> ShowS # show :: UserAdminSecret -> String # showList :: [UserAdminSecret] -> ShowS # | |
Eq UserAdminSecret Source # | |
Defined in Hasura.Session (==) :: UserAdminSecret -> UserAdminSecret -> Bool # (/=) :: UserAdminSecret -> UserAdminSecret -> Bool # |
askCurRole :: UserInfoM m => m RoleName Source #
mkUserInfo :: forall m. MonadError QErr m => UserRoleBuild -> UserAdminSecret -> SessionVariables -> m UserInfo Source #
Build UserInfo
from SessionVariables