diff --git a/src/datasources/category-api.ts b/src/datasources/category-api.ts index 8df7efc..019b4f5 100644 --- a/src/datasources/category-api.ts +++ b/src/datasources/category-api.ts @@ -131,7 +131,10 @@ WHERE product_category.product_id = ? // use other functions. const res = await this.localeDataLoader.load(id); if (locales) { - return res.filter((row) => locales.includes(row.locale)); + // Sort result in same order as they were requested in locales filter + return locales.map((locale) => { + return res.find((row) => row.locale === locale); + }); } return res; }