[graphql] fix for languages query

parent dd1fccf5
...@@ -215,7 +215,7 @@ getLanguages session = do ...@@ -215,7 +215,7 @@ getLanguages session = do
Right { languages } -> do Right { languages } -> do
liftEffect $ here.log2 "[getLanguages] languages" languages liftEffect $ here.log2 "[getLanguages] languages" languages
pure $ Right $ Map.fromFoldable $ (\{ key, value } -> Tuple key value) <$> languages pure $ Right $ Map.fromFoldable $ (\{ lt_lang, lt_server } -> Tuple lt_lang lt_server) <$> languages
getContextNgrams :: Session -> Int -> Int -> AffRESTError (Array NgramsTerm) getContextNgrams :: Session -> Int -> Int -> AffRESTError (Array NgramsTerm)
getContextNgrams session context_id list_id = do getContextNgrams session context_id list_id = do
......
...@@ -14,13 +14,13 @@ type LanguageProperties ...@@ -14,13 +14,13 @@ type LanguageProperties
} }
type Language type Language
= { key :: Lang = { lt_lang :: Lang
, value :: LanguageProperties } , lt_server :: LanguageProperties }
type NLPQuery = type NLPQuery =
{ languages :: { languages ::
{ key :: Unit { lt_lang :: Unit
, value :: { , lt_server :: {
url :: Unit url :: Unit
, server :: Unit } , server :: Unit }
} }
...@@ -28,8 +28,8 @@ type NLPQuery = ...@@ -28,8 +28,8 @@ type NLPQuery =
nlpQuery :: NLPQuery nlpQuery :: NLPQuery
nlpQuery = { languages: nlpQuery = { languages:
{ key : unit { lt_lang : unit
, value : { , lt_server : {
url : unit url : unit
, server: unit } , server: unit }
} }
......
...@@ -54,7 +54,7 @@ derive instance Generic Lang _ ...@@ -54,7 +54,7 @@ derive instance Generic Lang _
derive instance Ord Lang derive instance Ord Lang
instance Show Lang where instance Show Lang where
-- show Universal = "All" show Universal = "All"
show No_extraction = "Nothing" show No_extraction = "Nothing"
show s = genericShow s show s = genericShow s
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment