Problem/Motivation
As a consumer of menu items API, I want to reduce the volume of response for a large menu dataset, so that I reduce the network overhead of downloading this menu when it has many items.
Internally we want to use this module in order to reduce the number of requests made to the API to fetch menus. However, in the spirit of optimising our request footprint, many of the fields aren't relevant to our FE consuming code.
In order to reduce the network response, we want to be able to request what elements return per menu item so that only relevant data points are returned.
Steps to reproduce
1. Install Drupal and JSON:API Menu Items module
2. Create Node with Menu link
3. Request menu items with a filter to only supply provided fields, i.e. filter[fields]=title,url,parent,children
Proposed resolution
1. Create a method that allows filtering of the `fields` array in ~L186 of MenuItemsResource.php
2. A proposed patch is forthcoming today to demonstrate a potential solution
Remaining tasks
1. Add tests to ensure filtering works as expected.
User interface changes
N/A
API changes
1. Potential reduction of fields returned as part of API signature
Data model changes
N/A