[graphql] fix for languages query

parent dd1fccf5
Pipeline #5558 failed with stage
in 0 seconds
......@@ -215,7 +215,7 @@ getLanguages session = do
Right { languages } -> do
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 context_id list_id = do
......
......@@ -14,13 +14,13 @@ type LanguageProperties
}
type Language
= { key :: Lang
, value :: LanguageProperties }
= { lt_lang :: Lang
, lt_server :: LanguageProperties }
type NLPQuery =
{ languages ::
{ key :: Unit
, value :: {
{ lt_lang :: Unit
, lt_server :: {
url :: Unit
, server :: Unit }
}
......@@ -28,8 +28,8 @@ type NLPQuery =
nlpQuery :: NLPQuery
nlpQuery = { languages:
{ key : unit
, value : {
{ lt_lang : unit
, lt_server : {
url : unit
, server: unit }
}
......
......@@ -54,7 +54,7 @@ derive instance Generic Lang _
derive instance Ord Lang
instance Show Lang where
-- show Universal = "All"
show Universal = "All"
show No_extraction = "Nothing"
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