mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-17 20:41:49 +03:00
2152911e24
GitOrigin-RevId: 0dd10f1ccd338b1cf382ebff59b6ee7f209d39a1
27 lines
695 B
Haskell
27 lines
695 B
Haskell
module Hasura.RQL.DDL.Deps
|
|
( reportDeps
|
|
, reportDepsExt
|
|
)
|
|
where
|
|
|
|
import Hasura.Prelude
|
|
|
|
import Data.Text.Extended
|
|
|
|
import Hasura.Base.Error
|
|
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
|