-
-
Notifications
You must be signed in to change notification settings - Fork 964
[question] How to implement ?fields=name,email filter? #193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I don't think this can be implemented as a custom filter. And serializer groups seem ill-suited for this... |
Indeed, you can do this by using serialization groups. |
I've started to add this feature in the Symfony Serializer but it's not finished yet (see comments): symfony/symfony#18834 Any help welcome :) |
By the way, it can be also be easily added by decorating the You can directly inject the |
Thanks Kévin, for the feedback. I've used dynamic serialization groups for now (not as dynamic as I wanted above) but I will try your suggestion asap. :) |
It's may impleaments into DataProvider too. It's not really usefull to fetch unused data. |
symfony/symfony#18834 has been merged. 🎉 |
Looking forward to this. |
This has been implemented in core ! |
Hello everyone and thanks for this great bundle!
I'm currently trying to find a way to limit the returned fields on a GET request dynamically by using a
fields
list on the query string.Standard:
GET /books
With filter:
GET /books?fields=id,title
What would be the recommended way to solve this?
The text was updated successfully, but these errors were encountered: