multilingual – How do I get an item’s language versions in GraphQL for Sitecore JSS?

how can I get all of the languages that an item has versions in in GraphQL? e.g. in .Net I would have done this:

Item tempItem = Sitecore.Context.Database.GetItem(tempID);
foreach (var itemLanguage in tempItem.Languages)
{
    var item = tempItem.Database.GetItem(tempItem.ID, itemLanguage);
    if (item.Versions.Count > 0)
    {
         // do something. If there is no "ru" version, this will be 0
    }
}

I need to do the same thing in my JSS app. Is there a way to do this other than iterating through multiple graphql requests with each language and checking if the results for each language are null? I’d much rather get all existing languages in one single query

Read more here: Source link