next-drupal
next-drupal copied to clipboard
collection meta info has been dropped.
Package containing the bug
next-drupal (NPM package)
Describe the bug
getResourceCollection, and getSearchIndex returns only array of data when doing deserialize. Not able to handle pagination.
Expected behavior
include extra info like getView
const results = options.deserialize ? this.deserialize(data) : data
return {
id: name,
results,
meta: data.meta,
links: data.links,
}
hi,
please activate in the Drupal backend under /admin/config/services/jsonapi/extras the point Include count in collection queries.
After this you can use getResourceCollectionwith the deserialize: false option. Note that you must deserialize your result by yourself.