Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
153
Issues
153
List
Board
Labels
Milestones
Merge Requests
9
Merge Requests
9
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
561560a8
Commit
561560a8
authored
Jun 05, 2022
by
Karen Konou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Team API] Types definitions
parent
d9f74432
Pipeline
#2890
failed with stage
in 22 minutes and 23 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
4 deletions
+40
-4
gargantext.cabal
gargantext.cabal
+1
-0
GraphQL.hs
src/Gargantext/API/GraphQL.hs
+9
-4
Team.hs
src/Gargantext/API/GraphQL/Team.hs
+30
-0
No files found.
gargantext.cabal
View file @
561560a8
...
...
@@ -111,6 +111,7 @@ library
Gargantext.API.GraphQL.AsyncTask
Gargantext.API.GraphQL.IMT
Gargantext.API.GraphQL.Node
Gargantext.API.GraphQL.Team
Gargantext.API.GraphQL.TreeFirstLevel
Gargantext.API.GraphQL.User
Gargantext.API.GraphQL.UserInfo
...
...
src/Gargantext/API/GraphQL.hs
View file @
561560a8
...
...
@@ -41,6 +41,7 @@ import qualified Gargantext.API.GraphQL.Node as GQLNode
import
qualified
Gargantext.API.GraphQL.User
as
GQLUser
import
qualified
Gargantext.API.GraphQL.UserInfo
as
GQLUserInfo
import
qualified
Gargantext.API.GraphQL.TreeFirstLevel
as
GQLTree
import
qualified
Gargantext.API.GraphQL.Team
as
GQLTeam
import
Gargantext.API.Prelude
(
GargM
,
GargError
)
import
Gargantext.API.Types
import
Gargantext.Core.Mail.Types
(
HasMail
)
...
...
@@ -72,12 +73,14 @@ data Query m
,
user_infos
::
GQLUserInfo
.
UserInfoArgs
->
m
[
GQLUserInfo
.
UserInfo
]
,
users
::
GQLUser
.
UserArgs
->
m
[
GQLUser
.
User
m
]
,
tree
::
GQLTree
.
TreeArgs
->
m
(
GQLTree
.
TreeFirstLevel
m
)
,
team
::
GQLTeam
.
TeamArgs
->
m
[
GQLTeam
.
TeamMember
]
}
deriving
(
Generic
,
GQLType
)
data
Mutation
m
=
Mutation
{
update_user_info
::
GQLUserInfo
.
UserInfoMArgs
->
m
Int
}
deriving
(
Generic
,
GQLType
)
{
update_user_info
::
GQLUserInfo
.
UserInfoMArgs
->
m
Int
,
delete_team_membership
::
GQLTeam
.
TeamDeleteMArgs
->
m
[
Int
]
}
deriving
(
Generic
,
GQLType
)
-- | Possible GraphQL Events, i.e. here we describe how we will
-- manipulate the data.
...
...
@@ -108,8 +111,10 @@ rootResolver =
,
node_parent
=
GQLNode
.
resolveNodeParent
,
user_infos
=
GQLUserInfo
.
resolveUserInfos
,
users
=
GQLUser
.
resolveUsers
,
tree
=
GQLTree
.
resolveTree
}
,
mutationResolver
=
Mutation
{
update_user_info
=
GQLUserInfo
.
updateUserInfo
}
,
tree
=
GQLTree
.
resolveTree
,
team
=
GQLTeam
.
resolveTeam
}
,
mutationResolver
=
Mutation
{
update_user_info
=
GQLUserInfo
.
updateUserInfo
,
delete_team_membership
=
GQLTeam
.
deleteTeamMembership
}
,
subscriptionResolver
=
Undefined
}
-- | Main GraphQL "app".
...
...
src/Gargantext/API/GraphQL/Team.hs
0 → 100644
View file @
561560a8
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DuplicateRecordFields #-}
module
Gargantext.API.GraphQL.Team
where
import
Gargantext.Prelude
import
GHC.Generics
(
Generic
)
import
Data.Morpheus.Types
(
GQLType
)
import
Data.Text
data
TeamArgs
=
TeamArgs
{
team_node_id
::
Int
}
deriving
(
Generic
,
GQLType
)
data
TeamMember
=
TeamMember
{
username
::
Text
,
shared_folder_id
::
Int
}
deriving
(
Generic
,
GQLType
)
data
TeamDeleteMArgs
=
TeamDeleteMArgs
{
token
::
Text
,
shared_folder_id
::
Int
,
team_node_id
::
Int
}
deriving
(
Generic
,
GQLType
)
todo
::
a
todo
=
undefined
resolveTeam
=
todo
deleteTeamMembership
=
todo
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment