Browse Source

query node - mapping of language iso to id

ondratra 3 years ago
parent
commit
affbbedf2a
1 changed files with 3 additions and 1 deletions
  1. 3 1
      query-node/mappings/src/content/utils.ts

+ 3 - 1
query-node/mappings/src/content/utils.ts

@@ -620,7 +620,9 @@ async function prepareLanguage(
 
   // create new language
   const newLanguage = new Language({
-    id: await getNextId(db),
+    // set id as iso to overcome current graphql filtering limitations (so we can use query `videos(where: {languageId_eq: 'en'})`)
+    // id: await getNextId(db),
+    id: languageIso,
     iso: languageIso,
     createdInBlock: event.blockNumber,