Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kristiyan-velkov-jakala opened this issue May 28, 2024 · 0 comments
Labels
enhancement New feature or request triage A new issue that needs triage

Comments

@kristiyan-velkov-jakala

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!

@kristiyan-velkov-jakala kristiyan-velkov-jakala added enhancement New feature or request triage A new issue that needs triage labels May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage A new issue that needs triage
Projects
None yet
Development

No branches or pull requests

1 participant