[breadcrumb] fix for node_id in breadcrumb request

parent f34815ac
......@@ -160,7 +160,7 @@ type Schema
, users :: { user_id :: Int } ==> Array User
, team :: { team_node_id :: Int } ==> Team
, tree :: { root_id :: Int } ==> TreeFirstLevel
, tree_branch :: { nodeId :: Int } ==> BreadcrumbInfo
, tree_branch :: { node_id :: Int } ==> BreadcrumbInfo
}
type Mutation
......
......@@ -228,7 +228,7 @@ getContextNgrams session context_id list_id = do
pure $ rmap (\{ context_ngrams } -> NormNgramsTerm <$> context_ngrams) eRes
getBreadcrumb :: Session -> Int -> AffRESTError BreadcrumbInfo
getBreadcrumb session nodeId = do
eRes <- queryGql session "get breadcrumb branch" $ breadcrumbQuery `withVars` { nodeId }
getBreadcrumb session node_id = do
eRes <- queryGql session "get breadcrumb branch" $ breadcrumbQuery `withVars` { node_id }
-- liftEffect $ here.log2 "[getBreadcrumb] breadcrumb" tree_branch
pure $ rmap _.tree_branch eRes
......@@ -43,7 +43,7 @@ treeFirstLevelQuery = { tree: { root_id: Var :: _ "id" Int} =>>
}
}
breadcrumbQuery = { tree_branch: { nodeId: Var :: _ "nodeId" Int } =>>
breadcrumbQuery = { tree_branch: { node_id: Var :: _ "node_id" Int } =>>
{ parents:
{ name: unit
, node_type: unit
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment