Explorar o código

query node - mapping of language iso to id

ondratra %!s(int64=3) %!d(string=hai) anos
pai
achega
affbbedf2a
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  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,