I have a list of topics. In each topic there can be many contributions:
My FE looks like this
this.theme2 = await this._topicService.getThemeandContributions(this.themeId.toString()).toPromise(),
this.topicContributions = this.theme2.topicContributions
With this im calling my BE to call a strapi fetch like this:
public async Task<Topic> GetThemeandContributionsAsync(string id, string additionalQuery = "sort=updatedAt:desc")
{
var endpoint = "topics";
var query = "?populate[topic_contributions][populate]=*";
var themeJson = await FetchDataAsync<List<Topic>>(endpoint, "/" + id + query + "&" + additionalQuery);
var themeData = themeJson["data"];
return MapToTopicDto(themeData);
}
For some reason the “sort=updatedAt:desc” is completely ignored.
Ive done it at other content types and it worked. So it might be an issue with relations?
Ive noticed that it always shows the order of the relationfield: