Next.js for Drupal has everything you need to build a next-generation front-end for your Drupal site: SSG, SSR, and ISR, Multi-site, Authentication, Webforms, Search API, I18n and Preview mode (works with JSON:API and GraphQL).
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(),
});
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(), });