mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 09:22:43 +03:00
rename NativeQuery module hierarchy to LogicalModel
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8063 GitOrigin-RevId: 0ed0cee7fb1d77f166770caae21cc05d5dd30b75
This commit is contained in:
parent
68e8091fda
commit
2b0e9ea14c
@ -739,11 +739,11 @@ library
|
||||
, Hasura.Server.Auth.JWT
|
||||
, Hasura.GC
|
||||
|
||||
, Hasura.NativeQuery.IR
|
||||
, Hasura.NativeQuery.Metadata
|
||||
, Hasura.NativeQuery.API
|
||||
, Hasura.NativeQuery.Schema
|
||||
, Hasura.NativeQuery.Types
|
||||
, Hasura.LogicalModel.IR
|
||||
, Hasura.LogicalModel.Metadata
|
||||
, Hasura.LogicalModel.API
|
||||
, Hasura.LogicalModel.Schema
|
||||
, Hasura.LogicalModel.Types
|
||||
|
||||
, Hasura.Server.Auth.WebHook
|
||||
, Hasura.Server.Middleware
|
||||
|
@ -11,7 +11,7 @@ import Database.PG.Query qualified as PG
|
||||
import Hasura.Backends.Postgres.Connection qualified as PG
|
||||
import Hasura.Backends.Postgres.Connection.Connect (withPostgresDB)
|
||||
import Hasura.Base.Error
|
||||
import Hasura.NativeQuery.Metadata
|
||||
import Hasura.LogicalModel.Metadata
|
||||
import Hasura.Prelude
|
||||
import Hasura.SQL.Backend
|
||||
|
||||
|
@ -65,8 +65,8 @@ import Hasura.GraphQL.Schema.Parser qualified as P
|
||||
import Hasura.GraphQL.Schema.Select
|
||||
import Hasura.GraphQL.Schema.Update qualified as SU
|
||||
import Hasura.GraphQL.Schema.Update.Batch qualified as SUB
|
||||
import Hasura.LogicalModel.Schema qualified as LogicalModels
|
||||
import Hasura.Name qualified as Name
|
||||
import Hasura.NativeQuery.Schema qualified as LogicalModels
|
||||
import Hasura.Prelude
|
||||
import Hasura.RQL.IR.BoolExp
|
||||
import Hasura.RQL.IR.Root (RemoteRelationshipField)
|
||||
|
@ -113,7 +113,7 @@ import Data.String (fromString)
|
||||
import Data.Text (pack)
|
||||
import Data.Text.Extended
|
||||
import Hasura.Backends.Postgres.SQL.Types
|
||||
import Hasura.NativeQuery.Metadata
|
||||
import Hasura.LogicalModel.Metadata
|
||||
import Hasura.Prelude
|
||||
import Hasura.SQL.Types
|
||||
import Text.Builder qualified as TB
|
||||
|
@ -41,8 +41,8 @@ import Hasura.Backends.Postgres.SQL.Types
|
||||
import Hasura.Backends.Postgres.Translate.Select.Internal.Aliases
|
||||
import Hasura.Backends.Postgres.Translate.Types (CustomSQLCTEs (..))
|
||||
import Hasura.Backends.Postgres.Types.Function
|
||||
import Hasura.NativeQuery.IR (NativeQuery (..))
|
||||
import Hasura.NativeQuery.Metadata (LogicalModelName (..))
|
||||
import Hasura.LogicalModel.IR (NativeQuery (..))
|
||||
import Hasura.LogicalModel.Metadata (LogicalModelName (..))
|
||||
import Hasura.Prelude
|
||||
import Hasura.RQL.IR
|
||||
import Hasura.RQL.Types.Common (FieldName)
|
||||
|
@ -81,7 +81,7 @@ import Hasura.Backends.Postgres.Translate.Types
|
||||
import Hasura.GraphQL.Schema.NamingCase (NamingCase)
|
||||
import Hasura.GraphQL.Schema.Node (currentNodeIdVersion, nodeIdVersionInt)
|
||||
import Hasura.GraphQL.Schema.Options qualified as Options
|
||||
import Hasura.NativeQuery.IR (NativeQuery (..))
|
||||
import Hasura.LogicalModel.IR (NativeQuery (..))
|
||||
import Hasura.Prelude
|
||||
import Hasura.RQL.IR.BoolExp
|
||||
import Hasura.RQL.IR.OrderBy (OrderByItemG (OrderByItemG, obiColumn))
|
||||
|
@ -34,7 +34,7 @@ import Data.HashMap.Strict qualified as HM
|
||||
import Data.Int (Int64)
|
||||
import Hasura.Backends.Postgres.SQL.DML qualified as Postgres
|
||||
import Hasura.Backends.Postgres.SQL.Types qualified as Postgres
|
||||
import Hasura.NativeQuery.Metadata (InterpolatedQuery)
|
||||
import Hasura.LogicalModel.Metadata (InterpolatedQuery)
|
||||
import Hasura.Prelude
|
||||
import Hasura.RQL.IR.Select
|
||||
import Hasura.RQL.Types.Common
|
||||
|
@ -45,7 +45,7 @@ import Hasura.GraphQL.ApolloFederation (ApolloFederationParserFunction)
|
||||
import Hasura.GraphQL.Schema.Common
|
||||
import Hasura.GraphQL.Schema.NamingCase
|
||||
import Hasura.GraphQL.Schema.Parser hiding (Type)
|
||||
import Hasura.NativeQuery.Metadata (NativeQueryInfo)
|
||||
import Hasura.LogicalModel.Metadata (NativeQueryInfo)
|
||||
import Hasura.Prelude
|
||||
import Hasura.RQL.IR
|
||||
import Hasura.RQL.IR.Insert qualified as IR
|
||||
|
@ -1,7 +1,7 @@
|
||||
{-# LANGUAGE UndecidableInstances #-}
|
||||
|
||||
-- | Define and handle v1/metadata API operations to track, untrack, and get logical models.
|
||||
module Hasura.NativeQuery.API
|
||||
module Hasura.LogicalModel.API
|
||||
( GetLogicalModel (..),
|
||||
TrackLogicalModel (..),
|
||||
UntrackLogicalModel (..),
|
||||
@ -9,7 +9,7 @@ module Hasura.NativeQuery.API
|
||||
runTrackLogicalModel,
|
||||
runUntrackLogicalModel,
|
||||
dropLogicalModelInMetadata,
|
||||
module Hasura.NativeQuery.Types,
|
||||
module Hasura.LogicalModel.Types,
|
||||
)
|
||||
where
|
||||
|
||||
@ -22,9 +22,9 @@ import Data.HashMap.Strict.InsOrd.Extended qualified as OMap
|
||||
import Hasura.Base.Error
|
||||
import Hasura.CustomReturnType (CustomReturnType)
|
||||
import Hasura.EncJSON
|
||||
import Hasura.LogicalModel.Metadata (NativeQueryArgumentName, NativeQueryInfo (..), parseInterpolatedQuery)
|
||||
import Hasura.LogicalModel.Types
|
||||
import Hasura.Metadata.DTO.Utils (codecNamePrefix)
|
||||
import Hasura.NativeQuery.Metadata (NativeQueryArgumentName, NativeQueryInfo (..), parseInterpolatedQuery)
|
||||
import Hasura.NativeQuery.Types
|
||||
import Hasura.Prelude
|
||||
import Hasura.RQL.Types.Backend (Backend, ScalarType, SourceConnConfiguration)
|
||||
import Hasura.RQL.Types.Common (SourceName, sourceNameToText, successMsg)
|
@ -1,11 +1,11 @@
|
||||
-- | This module contains the default types and functions that model Native
|
||||
-- Queries.
|
||||
module Hasura.NativeQuery.IR
|
||||
module Hasura.LogicalModel.IR
|
||||
( NativeQuery (..),
|
||||
)
|
||||
where
|
||||
|
||||
import Hasura.NativeQuery.Metadata
|
||||
import Hasura.LogicalModel.Metadata
|
||||
import Hasura.Prelude
|
||||
import Hasura.RQL.Types.Backend
|
||||
import Hasura.RQL.Types.Column (ColumnValue)
|
@ -3,14 +3,14 @@
|
||||
|
||||
-- | This module houses the types and functions associated with the default
|
||||
-- implementation of the metadata of native queries.
|
||||
module Hasura.NativeQuery.Metadata
|
||||
module Hasura.LogicalModel.Metadata
|
||||
( LogicalModelName (..),
|
||||
NativeQueryInfo (..),
|
||||
NativeQueryArgumentName (..),
|
||||
InterpolatedItem (..),
|
||||
InterpolatedQuery (..),
|
||||
parseInterpolatedQuery,
|
||||
module Hasura.NativeQuery.Types,
|
||||
module Hasura.LogicalModel.Types,
|
||||
)
|
||||
where
|
||||
|
||||
@ -20,8 +20,8 @@ import Data.Aeson
|
||||
import Data.Bifunctor (first)
|
||||
import Data.Text qualified as T
|
||||
import Hasura.CustomReturnType (CustomReturnType)
|
||||
import Hasura.LogicalModel.Types
|
||||
import Hasura.Metadata.DTO.Utils (codecNamePrefix)
|
||||
import Hasura.NativeQuery.Types
|
||||
import Hasura.Prelude hiding (first)
|
||||
import Hasura.RQL.Types.Backend
|
||||
import Hasura.SQL.Backend
|
@ -1,7 +1,7 @@
|
||||
{-# LANGUAGE QuasiQuotes #-}
|
||||
|
||||
-- | Schema parsers for logical models.
|
||||
module Hasura.NativeQuery.Schema (defaultBuildLogicalModelRootFields) where
|
||||
module Hasura.LogicalModel.Schema (defaultBuildLogicalModelRootFields) where
|
||||
|
||||
import Data.Has (Has (getter))
|
||||
import Data.HashMap.Strict qualified as HM
|
||||
@ -20,8 +20,8 @@ import Hasura.GraphQL.Schema.Parser qualified as P
|
||||
import Hasura.GraphQL.Schema.Select
|
||||
( customTypeSelectionList,
|
||||
)
|
||||
import Hasura.NativeQuery.IR (NativeQuery (..))
|
||||
import Hasura.NativeQuery.Metadata
|
||||
import Hasura.LogicalModel.IR (NativeQuery (..))
|
||||
import Hasura.LogicalModel.Metadata
|
||||
import Hasura.Prelude
|
||||
import Hasura.RQL.IR.BoolExp (gBoolExpTrue)
|
||||
import Hasura.RQL.IR.Root (RemoteRelationshipField)
|
@ -1,5 +1,5 @@
|
||||
-- | A name for a logical model as it is recognized by the graphql schema.
|
||||
module Hasura.NativeQuery.Types
|
||||
module Hasura.LogicalModel.Types
|
||||
( LogicalModelName (..),
|
||||
)
|
||||
where
|
@ -40,8 +40,8 @@ import Data.Text.Extended (dquote, dquoteList, (<<>))
|
||||
import Hasura.Base.Error
|
||||
import Hasura.EncJSON
|
||||
import Hasura.Logging qualified as HL
|
||||
import Hasura.LogicalModel.API
|
||||
import Hasura.Metadata.Class
|
||||
import Hasura.NativeQuery.API
|
||||
import Hasura.Prelude hiding (first)
|
||||
import Hasura.RQL.DDL.Action
|
||||
import Hasura.RQL.DDL.ComputedField
|
||||
|
@ -155,7 +155,7 @@ import Data.Sequence qualified as Seq
|
||||
import Hasura.Backends.Postgres.SQL.Types qualified as Postgres
|
||||
import Hasura.GraphQL.Schema.NamingCase (NamingCase)
|
||||
import Hasura.GraphQL.Schema.Options (StringifyNumbers)
|
||||
import Hasura.NativeQuery.IR (NativeQuery)
|
||||
import Hasura.LogicalModel.IR (NativeQuery)
|
||||
import Hasura.Prelude
|
||||
import Hasura.RQL.IR.BoolExp
|
||||
import Hasura.RQL.IR.OrderBy
|
||||
|
@ -11,7 +11,7 @@ import Hasura.Base.Error
|
||||
import Hasura.GraphQL.Schema.NamingCase
|
||||
import Hasura.Incremental qualified as Inc
|
||||
import Hasura.Logging (Hasura, Logger)
|
||||
import Hasura.NativeQuery.Metadata (NativeQueryInfo)
|
||||
import Hasura.LogicalModel.Metadata (NativeQueryInfo)
|
||||
import Hasura.Prelude
|
||||
import Hasura.RQL.IR.BoolExp
|
||||
import Hasura.RQL.Types.Backend
|
||||
|
@ -81,9 +81,9 @@ import Data.List.Extended qualified as L
|
||||
import Data.Maybe (fromJust)
|
||||
import Data.Text qualified as T
|
||||
import Data.Text.Extended qualified as T
|
||||
import Hasura.LogicalModel.Metadata (LogicalModelName, NativeQueryInfo (..))
|
||||
import Hasura.Metadata.DTO.Placeholder (placeholderCodecViaJSON)
|
||||
import Hasura.Metadata.DTO.Utils (codecNamePrefix)
|
||||
import Hasura.NativeQuery.Metadata (LogicalModelName, NativeQueryInfo (..))
|
||||
import Hasura.Prelude
|
||||
import Hasura.RQL.Types.Action
|
||||
import Hasura.RQL.Types.Allowlist
|
||||
|
@ -43,7 +43,7 @@ import Data.Text.Extended
|
||||
import Hasura.Backends.DataConnector.Adapter.Types (DataConnectorName)
|
||||
import Hasura.Base.ErrorMessage
|
||||
import Hasura.Base.ToErrorValue
|
||||
import Hasura.NativeQuery.Types
|
||||
import Hasura.LogicalModel.Types
|
||||
import Hasura.Prelude
|
||||
import Hasura.RQL.Types.Action
|
||||
import Hasura.RQL.Types.Backend
|
||||
|
@ -25,7 +25,7 @@ import Data.Aeson.Ordered qualified as AO
|
||||
import Data.HashMap.Strict.InsOrd.Extended qualified as OM
|
||||
import Data.Text.Extended qualified as T
|
||||
import Data.Vector qualified as Vector
|
||||
import Hasura.NativeQuery.Metadata (NativeQueryInfo (..))
|
||||
import Hasura.LogicalModel.Metadata (NativeQueryInfo (..))
|
||||
import Hasura.Prelude
|
||||
import Hasura.RQL.Types.Action
|
||||
( ActionDefinition (..),
|
||||
|
@ -21,8 +21,8 @@ import GHC.Generics.Extended (constrName)
|
||||
import Hasura.Base.Error
|
||||
import Hasura.EncJSON
|
||||
import Hasura.Logging qualified as L
|
||||
import Hasura.LogicalModel.API qualified as LogicalModels
|
||||
import Hasura.Metadata.Class
|
||||
import Hasura.NativeQuery.API qualified as LogicalModels
|
||||
import Hasura.Prelude hiding (first)
|
||||
import Hasura.RQL.DDL.Action
|
||||
import Hasura.RQL.DDL.ApiLimit
|
||||
|
@ -3,7 +3,7 @@ module Hasura.Server.API.Metadata
|
||||
)
|
||||
where
|
||||
|
||||
import Hasura.NativeQuery.API qualified as LogicalModels
|
||||
import Hasura.LogicalModel.API qualified as LogicalModels
|
||||
import Hasura.RQL.DDL.Action
|
||||
import Hasura.RQL.DDL.ComputedField
|
||||
import Hasura.RQL.DDL.ConnectionTemplate
|
||||
|
@ -40,7 +40,7 @@ import Data.Text qualified as T
|
||||
import Data.Text.Conversions (UTF8 (..), decodeText)
|
||||
import Hasura.HTTP
|
||||
import Hasura.Logging
|
||||
import Hasura.NativeQuery.Metadata (NativeQueryInfo, nqiArguments)
|
||||
import Hasura.LogicalModel.Metadata (NativeQueryInfo, nqiArguments)
|
||||
import Hasura.Prelude
|
||||
import Hasura.RQL.Types.Action
|
||||
import Hasura.RQL.Types.Common
|
||||
|
@ -7,7 +7,7 @@ module Hasura.Backends.Postgres.LogicalModels.LogicalModelsSpec
|
||||
where
|
||||
|
||||
import Hasura.Base.Error.TestInstances ()
|
||||
import Hasura.NativeQuery.Metadata
|
||||
import Hasura.LogicalModel.Metadata
|
||||
import Test.Hspec (Spec, describe, it, shouldBe)
|
||||
import Prelude
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user