File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed
server/src-lib/Hasura/GraphQL Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 11module Hasura.GraphQL.Execute
22 ( GQExecPlan (.. )
3+ , GQFieldExecPlan (.. )
34
45 , ExecPlanPartial
56 , getExecPlanPartial
@@ -60,12 +61,13 @@ import qualified Hasura.Logging as L
6061--
6162-- The 'a' is parameterised so this AST can represent
6263-- intermediate passes
63- data GQExecPlan a
64+ data GQFieldExecPlan a
6465 = GExPHasura ! a
65- | GExPRemote ! RemoteSchemaInfo ! VQ. RootSelSet
66- | GExPMixed (Seq. Seq (Either (RemoteSchemaInfo , VQ. RootSelSet ) a ))
66+ | GExPRemote ! RemoteSchemaInfo ! VQ. Field
6767 deriving (Functor , Foldable , Traversable )
6868
69+ type GQExecPlan a = [GQFieldExecPlan a ]
70+
6971-- | Execution context
7072data ExecutionCtx
7173 = ExecutionCtx
@@ -80,7 +82,7 @@ data ExecutionCtx
8082 }
8183
8284-- This is for when the graphql query is validated
83- type ExecPlanPartial = GQExecPlan (GCtx , VQ. RootSelSet )
85+ type ExecPlanPartial = [ GQFieldExecPlan (GCtx , VQ. Field )]
8486
8587getExecPlanPartial
8688 :: (MonadError QErr m )
Original file line number Diff line number Diff line change @@ -26,14 +26,13 @@ runGQ
2626 -> m (HttpResponse EncJSON )
2727runGQ reqId userInfo reqHdrs req = do
2828 E. ExecutionCtx _ sqlGenCtx pgExecCtx planCache sc scVer _ enableAL <- ask
29- execPlan <- E. getResolvedExecPlan pgExecCtx planCache
29+ fieldPlans <- E. getResolvedExecPlan pgExecCtx planCache
3030 userInfo sqlGenCtx enableAL sc scVer req
31- case execPlan of
31+ forM fieldPlans ( \ execPlan -> case execPlan of
3232 E. GExPHasura resolvedOp ->
3333 flip HttpResponse Nothing <$> runHasuraGQ reqId req userInfo resolvedOp
3434 E. GExPRemote rsi rootSelSet ->
35- E. execRemoteGQ reqId userInfo reqHdrs req rsi undefined
36- E. GExPMixed fieldPlans -> undefined
35+ E. execRemoteGQ reqId userInfo reqHdrs req rsi undefined )
3736
3837runHasuraGQ
3938 :: ( MonadIO m
You can’t perform that action at this time.
0 commit comments