mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-17 20:41:49 +03:00
29f2ddc289
This is an incremental PR towards https://github.com/hasura/graphql-engine/pull/5797 Co-authored-by: Anon Ray <ecthiender@users.noreply.github.com> GitOrigin-RevId: a6cb8c239b2ff840a0095e78845f682af0e588a9
25 lines
659 B
Haskell
25 lines
659 B
Haskell
module Hasura.RQL.DDL.Deps
|
|
( reportDeps
|
|
, reportDepsExt
|
|
)
|
|
where
|
|
|
|
import Hasura.Prelude
|
|
|
|
import Data.Text.Extended
|
|
|
|
import Hasura.RQL.Types
|
|
|
|
reportDeps :: (QErrM m) => [SchemaObjId] -> m ()
|
|
reportDeps deps =
|
|
throw400 DependencyError $
|
|
"cannot drop due to the following dependent objects : "
|
|
<> reportSchemaObjs deps
|
|
|
|
reportDepsExt :: (QErrM m) => [SchemaObjId] -> [Text] -> m ()
|
|
reportDepsExt deps unknownDeps =
|
|
throw400 DependencyError $
|
|
"cannot drop due to the following dependent objects : " <> depObjsTxt
|
|
where
|
|
depObjsTxt = commaSeparated $ reportSchemaObjs deps:unknownDeps
|