mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-16 18:42:30 +03:00
983fc2ad47
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8800 GitOrigin-RevId: e5e10f31c6cc8953a8ee947441a7f80b0e9b5e5e
29 lines
967 B
Haskell
29 lines
967 B
Haskell
-- | The RQL IR representation of an invocation of a native query.
|
|
module Hasura.NativeQuery.IR
|
|
( NativeQuery (..),
|
|
)
|
|
where
|
|
|
|
import Hasura.LogicalModel.IR
|
|
import Hasura.NativeQuery.Metadata
|
|
import Hasura.Prelude
|
|
import Hasura.RQL.Types.Backend
|
|
import Hasura.RQL.Types.Column (ColumnValue)
|
|
|
|
-- | The RQL IR representation of an invocation of a native query.
|
|
data NativeQuery b field = NativeQuery
|
|
{ -- | The graphql name of the native query.
|
|
nqRootFieldName :: NativeQueryName,
|
|
-- | The raw sql to use in the query
|
|
nqInterpolatedQuery :: InterpolatedQuery field,
|
|
-- | The arguments passed to the query, if any.
|
|
nqArgs :: HashMap NativeQueryArgumentName (ColumnValue b),
|
|
-- | The return type of the native query
|
|
nqLogicalModel :: LogicalModel b
|
|
}
|
|
deriving (Functor, Foldable, Traversable)
|
|
|
|
deriving instance (Backend b, Eq field) => Eq (NativeQuery b field)
|
|
|
|
deriving instance (Backend b, Show field) => Show (NativeQuery b field)
|