mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-19 05:21:47 +03:00
89bbb24c54
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7865 GitOrigin-RevId: 6c26edeb40f3b523053ffc45220a3c1046585de3
27 lines
903 B
Haskell
27 lines
903 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.Prelude
|
|
import Hasura.RQL.Types.Backend
|
|
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.
|
|
nqRootFieldName :: NativeQueryName,
|
|
-- | The raw sql to use in the query
|
|
nqInterpolatedQuery :: InterpolatedQuery field,
|
|
-- | The arguments passed to the native query, if any.
|
|
nqArgs :: HashMap NativeQueryArgumentName (ColumnValue b)
|
|
}
|
|
deriving (Functor, Foldable, Traversable)
|
|
|
|
deriving instance (Backend b, Eq field) => Eq (NativeQueryImpl b field)
|
|
|
|
deriving instance (Backend b, Show field) => Show (NativeQueryImpl b field)
|