Answer the question
In order to leave comments, you need to log in
API-Platform - is there a way to limit the selection on a one-to-many relationship?
If you choose the resource itself, then it has a selection limit (number of records / pagination). But when this resource has a connection to another [one-to-many] - then all available records are selected.
How to set a limit on the number of selected records by link in API-Platform
Answer the question
In order to leave comments, you need to log in
It's easier to make a call on the page with the API without getting the Platform (if you want, you can do an aggregation for the count). And already with the second request to get Platforms to this API with its pagination, if you need to get their list to it.
In the platform API, as well as in the symphony itself, there is an annotation MaxDepth for these purposes, more details here
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question