graphql-engine/server/src-lib/Hasura/NativeQuery/IR.hs
Daniel Harvey b80113912c server: generate native access sql
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7617
Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
GitOrigin-RevId: 48e0ccdda50a09bcbad1a86b7015a02f883889ab
2023-01-26 18:02:44 +00:00

25 lines
825 B
Haskell

-- | This module contains the default types and functions that model Native
-- Queries.
module Hasura.NativeQuery.IR
( NativeQueryImpl (..),
)
where
import Hasura.NativeQuery.Metadata
import Hasura.NativeQuery.Types
import Hasura.Prelude
import Hasura.RQL.Types.Column (ColumnValue)
-- | The default implementation of an invocation of a native query.
data NativeQueryImpl b field = NativeQueryImpl
{ -- | The defined name of the native query.
-- When translating this is used as a key to look up the actual
-- native query definition.
nqName :: NativeQueryName,
-- | The arguments passed to the native query, if any.
nqArgs :: HashMap NativeQueryArgumentName (ColumnValue b),
-- | The raw sql to use in the query
nqRawBody :: Text
}
deriving (Eq, Functor, Foldable, Traversable, Show)