next-drupal
next-drupal copied to clipboard
getMenu with addFields not working
I want to pull limited fields and only the tree for the getMenu. What is the way to achieve the same. Tried few things as below but did not worked , it returns all fields under items and tree objects. Is there any way to limit to get only tree results with limited set of fields
const navpageMenuParams = new DrupalJsonApiParams().addFields("menu--menu", [ "id", "title", ]); let navData = await drupal.getMenu("navigation", { params: navpageMenuParams.getQueryObject(), });
@Kaushikdugar try to edit the resource overrides: /admin/config/services/jsonapi/resource_types