graphql-engine/server/src-lib/Hasura/NativeQuery/Metadata.hs
Philip Lykke Carlsen cd5186be90 Implement Schema Parsers for Native Query Interface
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7574
GitOrigin-RevId: 0cb4638a7dd79abf6ccb05092c0c663c84675bbd
2023-01-19 11:27:24 +00:00

24 lines
737 B
Haskell

-- | This module houses the types and functions associated with the default
-- implementation of the metadata of native queries.
module Hasura.NativeQuery.Metadata
( NativeQueryArgumentName (..),
NativeQueryInfoImpl (..),
)
where
import Hasura.NativeQuery.Types
import Hasura.Prelude
import Hasura.RQL.Types.Backend
newtype NativeQueryArgumentName = NativeQueryArgumentName {getNativeQueryArgumentName :: Text}
deriving (Eq, Ord, Hashable, Show)
-- | Provisional data type for modelling metadata
data NativeQueryInfoImpl b = NativeQueryInfoImpl
{ nqiiName :: NativeQueryName,
nqiiCode :: Text,
nqiiReturns :: TableName b,
nqiiArgs :: HashMap NativeQueryArgumentName (ScalarType b),
nqiiComment :: Text
}