mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-19 21:41:44 +03:00
35 lines
784 B
Haskell
35 lines
784 B
Haskell
|
module Hasura.RemoteSchema.Metadata.Base
|
||
|
( RemoteSchemaName (..),
|
||
|
)
|
||
|
where
|
||
|
|
||
|
import Data.Aeson qualified as J
|
||
|
import Data.Text.Extended
|
||
|
import Data.Text.NonEmpty
|
||
|
import Database.PG.Query qualified as PG
|
||
|
import Hasura.Incremental (Cacheable)
|
||
|
import Hasura.Prelude
|
||
|
|
||
|
-- | Remote schema identifier.
|
||
|
--
|
||
|
-- NOTE: no validation on the character set is done here; it's likely there is
|
||
|
-- a bug (FIXME) where this interacts with remote relationships and some name
|
||
|
-- mangling needs to happen.
|
||
|
newtype RemoteSchemaName = RemoteSchemaName
|
||
|
{unRemoteSchemaName :: NonEmptyText}
|
||
|
deriving
|
||
|
( Show,
|
||
|
Eq,
|
||
|
Ord,
|
||
|
Hashable,
|
||
|
J.ToJSON,
|
||
|
J.ToJSONKey,
|
||
|
J.FromJSON,
|
||
|
PG.ToPrepArg,
|
||
|
PG.FromCol,
|
||
|
ToTxt,
|
||
|
NFData,
|
||
|
Generic,
|
||
|
Cacheable
|
||
|
)
|