Rest api returns only 2 levels of collections. After 2 levels only the ids of the collection are returned. What is the simplest way to modify the levels returned without using graphql?
Being able to specify either ids or the entire relation object would be great.
e.g. The /user/ route and the /auth/local route both reference the User.setting.json model. But only the /user/ route references the User controller.
I now see how to populate only specific relations including child relations. Very cool!
We use to have a setting autoPopulate which enables the population of every relational field by default. It might worth it to remove it and replace it with a more precise setting such as populate which could accept multiple values.
populate: all would have the same behavior as the autoPopulate by populating the first level of relational fields.
populate: ['category', 'category.tags'] would only populate the category field at the first level and the tags relational field at the second level.
populate: ['category', 'category.tags.name'] would only populate the category field at the first level, and the tags relational field at the second level by only returning the name of it.
IMO, it’s very close to an advanced query system that we could implement in the REST API. I don’t know what we have in mind regarding this and the v4 (cc @alexandrebodin)
Beta will likely be sometime late Q3, first “stable” release will be early Q4 to late Q4. It largely depends on how quickly we can make the changes. There are about 4 projects being worked on in parallel for the v4 but database layer changes won’t start until early Q3.
I have v4 installed right now, but relation fields are not being returned. Also, cannot find any docs to the “entirely new population system”. Any help would be appreciated. I’m not using GraphQL and would like to use relation fields if they are returned in API queries.