Open
Description
Package
next-drupal (NPM package)
Describe the feature request
Context
In using the next-drupal
package with JSON:API, we've observed that it returns additional data that isn't needed for our front-end applications. To improve efficiency and performance, we propose an enhancement to return only the data required by the front-end.
Proposal
- Optimize API Responses: Modify the
next-drupal
package to filter out unnecessary data from JSON:API responses, providing only the essential information required for frontend applications.
Describe the solution you'd like
- Enhanced Efficiency: Reduce the amount of data transferred and processed, leading to faster load times and improved performance.
- Simplified Data Handling: Make it easier for developers to work with API responses by returning only the relevant data.
Benefits
- Performance Improvement: Reducing the size of API responses will speed up data retrieval and rendering times in front-end applications.
- Better Resource Utilization: Minimizing unnecessary data processing will save computational resources and improve overall efficiency.
- Developer Experience: Simplified data structures will make it easier for developers to handle and use the data in their applications.
Implementation Steps
- Identify Required Data: Option to add data fields needed by typical frontend applications in DrupalJsonApiParams().
- Modify API Responses: Or Update the
next-drupal
package to filter and return only the identified data fields. - Documentation: Update the documentation to reflect the changes and provide guidelines on how to utilize the optimized API responses.
Describe alternatives you've considered
- Let's gather feedback and suggestions on this idea.
- Discuss potential challenges and solutions for implementing this optimization.
Thank you for your collaboration and support!