Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
137
Issues
137
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
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
purescript-gargantext
Commits
b2e461e7
Commit
b2e461e7
authored
Feb 05, 2022
by
Karen Konou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[GQL] fix client url
parent
f61f59f8
Pipeline
#2450
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
GraphQL.purs
src/Gargantext/Components/GraphQL.purs
+2
-1
No files found.
src/Gargantext/Components/GraphQL.purs
View file @
b2e461e7
...
@@ -12,6 +12,7 @@ import Effect.Class (liftEffect)
...
@@ -12,6 +12,7 @@ import Effect.Class (liftEffect)
import Foreign (unsafeToForeign, ForeignError)
import Foreign (unsafeToForeign, ForeignError)
import Gargantext.Components.GraphQL.Node (Node)
import Gargantext.Components.GraphQL.Node (Node)
import Gargantext.Components.GraphQL.User (User, UserInfo, UserInfoM)
import Gargantext.Components.GraphQL.User (User, UserInfo, UserInfoM)
import Gargantext.Ends (Backend(..))
import Gargantext.Sessions (Session(..))
import Gargantext.Sessions (Session(..))
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Reactix as R2
import GraphQL.Client.Args (type (==>))
import GraphQL.Client.Args (type (==>))
...
@@ -45,7 +46,7 @@ toJsonError :: NonEmptyList ForeignError -> JsonDecodeError
...
@@ -45,7 +46,7 @@ toJsonError :: NonEmptyList ForeignError -> JsonDecodeError
toJsonError = unsafeCoerce -- map ForeignErrors to JsonDecodeError as you wish
toJsonError = unsafeCoerce -- map ForeignErrors to JsonDecodeError as you wish
getClient :: Session -> Effect (Client UrqlClient Schema Mutation Void)
getClient :: Session -> Effect (Client UrqlClient Schema Mutation Void)
getClient (Session { token
}) = createClient { headers, url: "http://localhost:8008
/gql" }
getClient (Session { token
, backend: Backend b }) = createClient { headers, url: b.baseUrl <> "
/gql" }
where
where
headers = [ ARH.RequestHeader "Authorization" $ "Bearer " <> token ]
headers = [ ARH.RequestHeader "Authorization" $ "Bearer " <> token ]
...
...
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