Commit b092b18f authored by Karen Konou's avatar Karen Konou

[GQL] Update tree endpoint

parent 27399e65
Pipeline #2783 canceled with stage
......@@ -2,7 +2,7 @@ module Gargantext.Components.GraphQL.Endpoints where
import Gargantext.Prelude
import Gargantext.Components.GraphQL.Node (Node, nodeParentQuery)
import Gargantext.Components.GraphQL.Node (Node, nodeParentQuery, nodesQuery)
import Gargantext.Components.GraphQL.Tree (TreeFirstLevel, treeFirstLevelQuery)
import Gargantext.Components.GraphQL.User (UserInfo, userInfoQuery)
......
......@@ -11,6 +11,7 @@ type TreeNode =
{ name :: String
, id :: Int
, node_type :: NodeType
, parent_id :: Maybe Int
}
type TreeFirstLevel =
{ root :: TreeNode
......@@ -22,14 +23,17 @@ treeFirstLevelQuery = { tree: { root_id: Var :: _ "id" Int} =>>
{ root: { name: unit
, node_type: unit
, id: unit
, parent_id: unit
}
, children: { name: unit
, node_type: unit
, id: unit
, parent_id: unit
}
, parent: { name: unit
, node_type: unit
, id: unit
, parent_id: 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