Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Przemyslaw Kaminski
haskell-gargantext
Commits
76e614dd
Commit
76e614dd
authored
Oct 26, 2021
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[graphql] some more graphql work
parent
64e4f3d1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
4 deletions
+19
-4
Utils.hs
src/Gargantext/API/GraphQL/Utils.hs
+11
-0
User.hs
src/Gargantext/Database/Admin/Types/Hyperdata/User.hs
+3
-3
stack.yaml
stack.yaml
+5
-1
No files found.
src/Gargantext/API/GraphQL/Utils.hs
0 → 100644
View file @
76e614dd
module
Gargantext.API.GraphQL.Utils
where
import
Data.Morpheus.Types
(
GQLTypeOptions
,
fieldLabelModifier
)
import
qualified
Data.Text
as
T
import
Gargantext.Core.Utils.Prefix
(
unCapitalize
,
dropPrefix
)
import
Gargantext.Prelude
unPrefix
::
T
.
Text
->
GQLTypeOptions
->
GQLTypeOptions
unPrefix
prefix
gqlto
=
fieldLabelModifier
gqlto
nflm
where
nflm
label
=
unCapitalize
$
dropPrefix
(
T
.
unpack
prefix
)
label
src/Gargantext/Database/Admin/Types/Hyperdata/User.hs
View file @
76e614dd
...
...
@@ -25,11 +25,12 @@ module Gargantext.Database.Admin.Types.Hyperdata.User
where
import
Data.Morpheus.Types
(
GQLType
(
typeOptions
),
defaultTypeOptions
)
import
Gargantext.Prelude
import
qualified
Gargantext.API.GraphQL.Utils
as
GAGU
import
Gargantext.Core
(
Lang
(
..
))
import
Gargantext.Database.Admin.Types.Hyperdata.Prelude
import
Gargantext.Database.Admin.Types.Hyperdata.Contact
import
Gargantext.Database.Admin.Types.Node
(
DocumentId
)
import
Gargantext.Prelude
-- import Gargantext.Database.Schema.Node -- (Node(..))
...
...
@@ -40,8 +41,7 @@ data HyperdataUser =
}
deriving
(
Eq
,
Show
,
Generic
)
instance
GQLType
HyperdataUser
where
typeOptions
_
=
defaultTypeOptions
{
fieldLabelModifier
=
unCapitalize
.
dropPrefix
"_hu_"
}
typeOptions
_
=
GAGU
.
unPrefix
"_hu_"
defaultTypeOptions
data
HyperdataPrivate
=
HyperdataPrivate
{
_hpr_password
::
!
Text
...
...
stack.yaml
View file @
76e614dd
...
...
@@ -87,9 +87,13 @@ extra-deps:
-
accelerate-arithmetic-1.0.0.1@sha256:555639232aa5cad411e89247b27871d09352b987a754230a288c690b6de6d888,2096
-
git
:
https://github.com/morpheusgraphql/morpheus-graphql.git
commit
:
8dacc7cf81dec06225f420c9cabd1d8d3119019d
commit
:
339ee745049febbf2e7fd6fabf1e01afab19d0a9
subdirs
:
-
.
-
morpheus-graphql-app
-
morpheus-graphql-core
-
morpheus-graphql-code-gen
-
morpheus-graphql-subscriptions
# Others dependencies (using stack resolver)
-
constraints-extras-0.3.1.0@sha256:12016ebb91ad5ed2c82bf7e48c6bd6947d164d33c9dca5ac3965de1bb6c780c0,1777
...
...
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