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
199
Issues
199
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
f824ffaf
Verified
Commit
f824ffaf
authored
Jun 12, 2024
by
Przemyslaw Kaminski
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ws] some small refactoring
parent
a417606f
Pipeline
#6220
failed with stages
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
7 deletions
+8
-7
GraphQL.hs
src/Gargantext/API/GraphQL.hs
+3
-3
Named.hs
src/Gargantext/API/Routes/Named.hs
+1
-1
Named.hs
src/Gargantext/API/Server/Named.hs
+2
-2
Dispatcher.hs
src/Gargantext/Core/AsyncUpdates/Dispatcher.hs
+2
-1
No files found.
src/Gargantext/API/GraphQL.hs
View file @
f824ffaf
...
@@ -25,7 +25,7 @@ import Data.Morpheus ( App, deriveApp )
...
@@ -25,7 +25,7 @@ import Data.Morpheus ( App, deriveApp )
import
Data.Morpheus.Server
(
httpPlayground
)
import
Data.Morpheus.Server
(
httpPlayground
)
import
Data.Morpheus.Subscriptions
(
Event
(
..
),
httpPubApp
)
import
Data.Morpheus.Subscriptions
(
Event
(
..
),
httpPubApp
)
import
Data.Morpheus.Types
(
GQLRequest
,
GQLResponse
,
GQLType
,
RootResolver
(
..
),
Undefined
,
defaultRootResolver
)
import
Data.Morpheus.Types
(
GQLRequest
,
GQLResponse
,
GQLType
,
RootResolver
(
..
),
Undefined
,
defaultRootResolver
)
import
Data.Proxy
--
import Data.Proxy
import
Gargantext.API.Admin.Auth.Types
(
AuthenticatedUser
)
import
Gargantext.API.Admin.Auth.Types
(
AuthenticatedUser
)
import
Gargantext.API.Admin.Orchestrator.Types
(
JobLog
)
import
Gargantext.API.Admin.Orchestrator.Types
(
JobLog
)
import
Gargantext.API.Admin.Types
(
HasSettings
)
import
Gargantext.API.Admin.Types
(
HasSettings
)
...
@@ -167,8 +167,8 @@ data GraphQLAPIEndpoints mode = GraphQLAPIEndpoints
...
@@ -167,8 +167,8 @@ data GraphQLAPIEndpoints mode = GraphQLAPIEndpoints
}
}
deriving
Generic
deriving
Generic
gqapi
::
Proxy
(
ToServantApi
GraphQLAPI
)
--
gqapi :: Proxy (ToServantApi GraphQLAPI)
gqapi
=
Proxy
--
gqapi = Proxy
-- | Implementation of our API.
-- | Implementation of our API.
api
api
...
...
src/Gargantext/API/Routes/Named.hs
View file @
f824ffaf
...
@@ -43,7 +43,7 @@ newtype API mode = API
...
@@ -43,7 +43,7 @@ newtype API mode = API
data
NamedAPI
mode
=
NamedAPI
data
NamedAPI
mode
=
NamedAPI
{
swaggerAPI
::
mode
:-
SwaggerSchemaUI
"swagger-ui"
"swagger.json"
{
swaggerAPI
::
mode
:-
SwaggerSchemaUI
"swagger-ui"
"swagger.json"
,
backendAPI
::
mode
:-
NamedRoutes
BackEndAPI
,
backendAPI
::
mode
:-
NamedRoutes
BackEndAPI
,
graphqlAPI
::
mode
:-
NamedRoutes
GraphQLAPI
-- FIXME(adn) convert to named!
,
graphqlAPI
::
mode
:-
NamedRoutes
GraphQLAPI
,
frontendAPI
::
mode
:-
FrontEndAPI
,
frontendAPI
::
mode
:-
FrontEndAPI
,
wsAPI
::
mode
:-
NamedRoutes
Dispatcher
.
WSAPI
,
wsAPI
::
mode
:-
NamedRoutes
Dispatcher
.
WSAPI
}
deriving
Generic
}
deriving
Generic
...
...
src/Gargantext/API/Server/Named.hs
View file @
f824ffaf
...
@@ -62,9 +62,9 @@ server env =
...
@@ -62,9 +62,9 @@ server env =
(
transformJSONGQL
errScheme
)
(
transformJSONGQL
errScheme
)
GraphQL
.
api
GraphQL
.
api
,
frontendAPI
=
frontEndServer
,
frontendAPI
=
frontEndServer
,
wsAPI
=
hoistServer
WithContext
,
wsAPI
=
hoistServer
(
Proxy
::
Proxy
(
NamedRoutes
Dispatcher
.
WSAPI
))
(
Proxy
::
Proxy
(
NamedRoutes
Dispatcher
.
WSAPI
))
(
Proxy
::
Proxy
AuthContext
)
--
(Proxy :: Proxy AuthContext)
(
transformJSON
errScheme
)
(
transformJSON
errScheme
)
Dispatcher
.
wsServer
Dispatcher
.
wsServer
}
}
...
...
src/Gargantext/Core/AsyncUpdates/Dispatcher.hs
View file @
f824ffaf
...
@@ -113,7 +113,8 @@ newtype WSAPI mode = WSAPI {
...
@@ -113,7 +113,8 @@ newtype WSAPI mode = WSAPI {
wsServer
::
(
IsGargServer
env
err
m
,
HasDispatcher
env
,
HasSettings
env
)
=>
WSAPI
(
AsServerT
m
)
wsServer
::
(
IsGargServer
env
err
m
,
HasDispatcher
env
,
HasSettings
env
)
=>
WSAPI
(
AsServerT
m
)
wsServer
=
WSAPI
{
wsAPIServer
=
streamData
}
wsServer
=
WSAPI
{
wsAPIServer
=
streamData
}
where
where
streamData
::
(
IsGargServer
env
err
m
,
HasDispatcher
env
,
HasSettings
env
)
=>
WS
.
PendingConnection
->
m
()
streamData
::
(
IsGargServer
env
err
m
,
HasDispatcher
env
,
HasSettings
env
)
=>
WS
.
PendingConnection
->
m
()
streamData
pc
=
do
streamData
pc
=
do
authSettings
<-
view
settings
authSettings
<-
view
settings
d
<-
view
hasDispatcher
d
<-
view
hasDispatcher
...
...
Przemyslaw Kaminski
@cgenie
mentioned in commit
5660aec0
·
Oct 08, 2024
mentioned in commit
5660aec0
mentioned in commit 5660aec07ec5a0a0a5468f440092c1a8f57a864e
Toggle commit list
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