Skip to content

Optimize next-drupal to provide an option for returning only necessary data for front-end applications #771

Open
@kris-velkov

Description

@kris-velkov

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

  1. Identify Required Data: Option to add data fields needed by typical frontend applications in DrupalJsonApiParams().
  2. Modify API Responses: Or Update the next-drupal package to filter and return only the identified data fields.
  3. 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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttriageA new issue that needs triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions