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
12
Merge Requests
12
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
913ac007
Commit
913ac007
authored
Dec 01, 2021
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[graphql] return job from ethercalc csv mutation
parent
7e65040f
Pipeline
#2193
failed with stage
in 10 minutes and 25 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
4 deletions
+14
-4
GraphQL.hs
src/Gargantext/API/GraphQL.hs
+7
-4
Frame.hs
src/Gargantext/Database/Admin/Types/Hyperdata/Frame.hs
+6
-0
stack.yaml
stack.yaml
+1
-0
No files found.
src/Gargantext/API/GraphQL.hs
View file @
913ac007
...
...
@@ -33,6 +33,7 @@ import Gargantext.API.Admin.Auth.Types (AuthenticatedUser)
import
Gargantext.API.Admin.Orchestrator.Types
(
JobLog
)
import
Gargantext.API.Prelude
(
HasJobEnv
'
)
import
qualified
Gargantext.API.GraphQL.AsyncTask
as
GQLAT
import
qualified
Gargantext.API.GraphQL.Ethercalc
as
GQLEthercalc
import
qualified
Gargantext.API.GraphQL.Node
as
GQLNode
import
qualified
Gargantext.API.GraphQL.User
as
GQLUser
import
qualified
Gargantext.API.GraphQL.UserInfo
as
GQLUserInfo
...
...
@@ -69,7 +70,8 @@ data Query m
data
Mutation
m
=
Mutation
{
update_user_info
::
GQLUserInfo
.
UserInfoMArgs
->
m
Int
}
{
ethercalc_csv_download
::
GQLEthercalc
.
EthercalcCSVDownloadArgs
->
m
Int
,
update_user_info
::
GQLUserInfo
.
UserInfoMArgs
->
m
Int
}
deriving
(
Generic
,
GQLType
)
-- | Possible GraphQL Events, i.e. here we describe how we will
...
...
@@ -99,7 +101,8 @@ rootResolver =
,
node_parent
=
GQLNode
.
resolveNodeParent
,
user_infos
=
GQLUserInfo
.
resolveUserInfos
,
users
=
GQLUser
.
resolveUsers
}
,
mutationResolver
=
Mutation
{
update_user_info
=
GQLUserInfo
.
updateUserInfo
}
,
mutationResolver
=
Mutation
{
ethercalc_csv_download
=
GQLEthercalc
.
ethercalcCSVDownload
,
update_user_info
=
GQLUserInfo
.
updateUserInfo
}
,
subscriptionResolver
=
Undefined
}
-- | Main GraphQL "app".
...
...
@@ -148,5 +151,5 @@ api
::
(
Typeable
env
,
HasConnectionPool
env
,
HasConfig
env
,
HasMail
env
,
HasJobEnv'
env
)
=>
ServerT
API
(
GargM
env
GargError
)
api
(
SAS
.
Authenticated
_auser
)
=
httpPubApp
[]
app
:<|>
pure
httpPlayground
api
_
=
panic
"401 in graphql"
--SAS.throwAll (_ServerError # err401)
--
api _ = httpPubApp [] app :<|> pure httpPlayground
--
api _ = panic "401 in graphql" --SAS.throwAll (_ServerError # err401)
api
_
=
httpPubApp
[]
app
:<|>
pure
httpPlayground
src/Gargantext/Database/Admin/Types/Hyperdata/Frame.hs
View file @
913ac007
...
...
@@ -73,3 +73,9 @@ getHyperdataFrameContents (HyperdataFrame { _hf_base, _hf_frame_id }) = do
let
path
=
T
.
concat
[
_hf_base
,
"/"
,
_hf_frame_id
,
"/download"
]
r
<-
Wreq
.
get
$
T
.
unpack
path
pure
$
decodeUtf8
$
toStrict
$
r
^.
Wreq
.
responseBody
getHyperdataFrameCSV
::
HyperdataFrame
->
IO
Text
getHyperdataFrameCSV
(
HyperdataFrame
{
_hf_base
,
_hf_frame_id
})
=
do
let
path
=
T
.
concat
[
_hf_base
,
"/"
,
_hf_frame_id
,
".csv"
]
r
<-
Wreq
.
get
$
T
.
unpack
path
pure
$
decodeUtf8
$
toStrict
$
r
^.
Wreq
.
responseBody
stack.yaml
View file @
913ac007
...
...
@@ -2,6 +2,7 @@ resolver:
url
:
https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/18/18.yaml
flags
:
{}
extra-package-dbs
:
[]
skip-ghc-check
:
true
packages
:
-
.
#- 'deps/gargantext-graph'
...
...
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