mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-18 21:12:09 +03:00
2d9c8299c2
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8388 GitOrigin-RevId: cbf813d1114cb03816003ba73788d33ac37f1473
29 lines
983 B
Haskell
29 lines
983 B
Haskell
-- | The RQL IR representation of an invocation of a logical model.
|
|
module Hasura.LogicalModel.IR
|
|
( LogicalModel (..),
|
|
)
|
|
where
|
|
|
|
import Hasura.CustomReturnType
|
|
import Hasura.LogicalModel.Metadata
|
|
import Hasura.Prelude
|
|
import Hasura.RQL.Types.Backend
|
|
import Hasura.RQL.Types.Column (ColumnValue)
|
|
|
|
-- | The RQL IR representation of an invocation of a logical model.
|
|
data LogicalModel b field = LogicalModel
|
|
{ -- | The graphql name of the logical model.
|
|
lmRootFieldName :: LogicalModelName,
|
|
-- | The raw sql to use in the query
|
|
lmInterpolatedQuery :: InterpolatedQuery field,
|
|
-- | The arguments passed to the query, if any.
|
|
lmArgs :: HashMap LogicalModelArgumentName (ColumnValue b),
|
|
-- | The return type of the logical model
|
|
lmReturnType :: CustomReturnType b
|
|
}
|
|
deriving (Functor, Foldable, Traversable)
|
|
|
|
deriving instance (Backend b, Eq field) => Eq (LogicalModel b field)
|
|
|
|
deriving instance (Backend b, Show field) => Show (LogicalModel b field)
|