server: remove Action.hs-boot file

GitOrigin-RevId: 65267a7b6343a12b690f7710785fdfa30873e479
This commit is contained in:
Rakesh Emmadi 2021-03-10 12:56:22 +05:30 committed by hasura-bot
parent 0c1016e065
commit 2b0c990d50
5 changed files with 56 additions and 69 deletions

View File

@ -482,6 +482,7 @@ library
, Hasura.GraphQL.Context
, Hasura.GraphQL.Execute
, Hasura.GraphQL.Execute.Action
, Hasura.GraphQL.Execute.Action.Types
, Hasura.GraphQL.Execute.Backend
, Hasura.GraphQL.Execute.Common
, Hasura.GraphQL.Execute.Inline

View File

@ -1,8 +1,5 @@
module Hasura.GraphQL.Execute.Action
( ActionExecution(..)
, runActionExecution
, ActionExecutionPlan(..)
, ActionExecuteResult(..)
( runActionExecution
, asyncActionsProcessor
, resolveActionExecution
, resolveActionMutationAsync
@ -12,6 +9,7 @@ module Hasura.GraphQL.Execute.Action
, setActionStatusTx
, fetchActionResponseTx
, clearActionDataTx
, module Types
) where
import Hasura.Prelude
@ -55,6 +53,7 @@ import Hasura.Backends.Postgres.SQL.Value (PGScalarValue (..)
import Hasura.Backends.Postgres.Translate.Column (toTxtValue)
import Hasura.Backends.Postgres.Translate.Select (asSingleRowJsonResp)
import Hasura.EncJSON
import Hasura.GraphQL.Execute.Action.Types as Types
import Hasura.GraphQL.Execute.Prepare
import Hasura.GraphQL.Parser
import Hasura.HTTP
@ -68,20 +67,6 @@ import Hasura.Server.Utils (mkClientHeadersFor
import Hasura.Server.Version (HasVersion)
import Hasura.Session
newtype ActionExecution =
ActionExecution {
unActionExecution
:: forall m
. (MonadIO m, MonadBaseControl IO m, MonadError QErr m, Tracing.MonadTrace m) => m EncJSON
}
-- A plan to execute any action
data ActionExecutionPlan
= AEPSync !ActionExecution
| AEPAsyncQuery !ActionId !(ActionLogResponse -> ActionExecution)
| AEPAsyncMutation !EncJSON
runActionExecution
:: ( MonadIO m, MonadBaseControl IO m
, MonadError QErr m, Tracing.MonadTrace m
@ -168,12 +153,6 @@ instance L.ToEngineLog ActionHandlerLog L.Hasura where
toEngineLog ahl = (L.LevelInfo, L.ELTActionHandler, J.toJSON ahl)
data ActionExecuteResult
= ActionExecuteResult
{ _aerExecution :: !ActionExecution
, _aerHeaders :: !HTTP.ResponseHeaders
}
-- | Synchronously execute webhook handler and resolve response to action "output"
resolveActionExecution
:: ( HasVersion

View File

@ -1,24 +0,0 @@
module Hasura.GraphQL.Execute.Action where
import Hasura.Prelude
import Control.Monad.Trans.Control (MonadBaseControl)
import qualified Hasura.Tracing as Tracing
import Hasura.EncJSON
import Hasura.RQL.Types.Error
import Hasura.RQL.Types.Action
newtype ActionExecution =
ActionExecution {
unActionExecution
:: forall m
. (MonadIO m, MonadBaseControl IO m, MonadError QErr m, Tracing.MonadTrace m) => m EncJSON
}
data ActionExecutionPlan
= AEPSync !ActionExecution
| AEPAsyncQuery !ActionId !(ActionLogResponse -> ActionExecution)
| AEPAsyncMutation !EncJSON

View File

@ -0,0 +1,31 @@
module Hasura.GraphQL.Execute.Action.Types where
import Hasura.Prelude
import Control.Monad.Trans.Control (MonadBaseControl)
import qualified Hasura.Tracing as Tracing
import qualified Network.HTTP.Types as HTTP
import Hasura.EncJSON
import Hasura.RQL.Types
newtype ActionExecution =
ActionExecution {
unActionExecution
:: forall m
. (MonadIO m, MonadBaseControl IO m, MonadError QErr m, Tracing.MonadTrace m) => m EncJSON
}
-- A plan to execute any action
data ActionExecutionPlan
= AEPSync !ActionExecution
| AEPAsyncQuery !ActionId !(ActionLogResponse -> ActionExecution)
| AEPAsyncMutation !EncJSON
data ActionExecuteResult
= ActionExecuteResult
{ _aerExecution :: !ActionExecution
, _aerHeaders :: !HTTP.ResponseHeaders
}

View File

@ -2,31 +2,31 @@
module Hasura.GraphQL.Execute.Backend where
import Hasura.Prelude
import Hasura.Prelude
import qualified Data.Aeson as J
import qualified Data.Environment as Env
import qualified Language.GraphQL.Draft.Syntax as G
import qualified Network.HTTP.Client as HTTP
import qualified Network.HTTP.Types as HTTP
import qualified Data.Aeson as J
import qualified Data.Environment as Env
import qualified Language.GraphQL.Draft.Syntax as G
import qualified Network.HTTP.Client as HTTP
import qualified Network.HTTP.Types as HTTP
import Data.Kind (Type)
import Data.Text.Extended
import Data.Kind (Type)
import Data.Text.Extended
import qualified Hasura.GraphQL.Transport.HTTP.Protocol as GH
import qualified Hasura.GraphQL.Transport.HTTP.Protocol as GH
import Hasura.EncJSON
import Hasura.GraphQL.Context
import {-# SOURCE #-} Hasura.GraphQL.Execute.Action
import Hasura.GraphQL.Execute.LiveQuery.Plan
import Hasura.GraphQL.Parser hiding (Type)
import Hasura.RQL.IR.RemoteJoin
import Hasura.RQL.Types.Backend
import Hasura.RQL.Types.Error
import Hasura.RQL.Types.RemoteSchema
import Hasura.SQL.Backend
import Hasura.Server.Version (HasVersion)
import Hasura.Session
import Hasura.EncJSON
import Hasura.GraphQL.Context
import Hasura.GraphQL.Execute.Action.Types
import Hasura.GraphQL.Execute.LiveQuery.Plan
import Hasura.GraphQL.Parser hiding (Type)
import Hasura.RQL.IR.RemoteJoin
import Hasura.RQL.Types.Backend
import Hasura.RQL.Types.Error
import Hasura.RQL.Types.RemoteSchema
import Hasura.SQL.Backend
import Hasura.Server.Version (HasVersion)
import Hasura.Session
-- | This typeclass enacapsulates how a given backend translates a root field into an execution