Team.purs 728 Bytes
Newer Older
1 2 3 4 5 6 7
module Gargantext.Components.GraphQL.Team where

import Gargantext.Prelude

import GraphQL.Client.Args (NotNull, (=>>))
import GraphQL.Client.Variable (Var(..))

Karen Konou's avatar
Karen Konou committed
8
type Team
9
  = { team_owner_username :: String
Karen Konou's avatar
Karen Konou committed
10 11 12
    , team_members         :: Array TeamMember
    }

13 14 15 16 17 18 19 20 21 22 23 24
type TeamMember
  = { username         :: String
    , shared_folder_id :: Int
    }

type TeamDeleteM
  = { token :: NotNull String
    , shared_folder_id :: Int
    , team_node_id     :: Int
    }

teamQuery = { team: { team_node_id: Var :: _ "id" Int } =>>
25
              { team_owner_username: unit
Karen Konou's avatar
Karen Konou committed
26 27 28 29
              , team_members: { username: unit
                              , shared_folder_id: unit 
                              }
              }
30
            }