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

feat/AB#83059-remove-useless-graphql-fields-in-widget-queries #926

Conversation

estelafs
Copy link
Contributor

@estelafs estelafs commented Jan 9, 2024

Description

Updated resource type: the field "forms now have the optional args "id" and "ignore": getting a form id returns a single form (resource template) instead of all of the data, and getting the boolean "ignore" all the data will be ignore and not fetched, this, because the grid don't have a template and send this data to the front-end, is useless.

Updated the fields "layouts" and "aggregations" with the same args "ignore" so we don't fetch useless data if the widget doesn't use layouts or aggregations.

Also updated the field "metadata" with the args "ignore" to ignore all the metadata data (in cases when the summary card widget doesn't use a layout so don't need metadata info to build fields and send this data is useless).

Useful links

Type of change

  • Improvement (refactor or addition to existing functionality)

How Has This Been Tested?

Testing the resource query with a ignore args and a form id args for all the cases for grid and summary card widgets

Checklist:

( * == Mandatory )

  • * I have set myself as assignee of the pull request
  • * My code follows the style guidelines of this project
  • * Linting does not generate new warnings
  • * I have performed a self-review of my own code
  • * I have put the ticket for review, adding the oort-backend team to the list of reviewers
  • * I have commented my code, particularly in hard-to-understand areas
  • * I have put JSDoc comment in all required places
  • * My changes generate no new warnings
  • * I have included screenshots describing my changes if relevant
  • * I have selected labels in the Pull Request, according to the changes with code brings
  • I have made corresponding changes to the documentation ( if required )
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

More explanation

https://www.loom.com/share/05a716d61b9744faaf51fb304c21d1e5?sid=f87cf896-582a-4f76-93ae-8ceed801b145

@estelafs estelafs marked this pull request as draft January 10, 2024 12:23
@estelafs estelafs marked this pull request as ready for review January 11, 2024 14:43
@RenzoPrats RenzoPrats requested review from RenzoPrats and removed request for a team January 11, 2024 18:26
Copy link
Contributor

@RenzoPrats RenzoPrats left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working fine, looks good to me!

@AntoineRelief
Copy link
Collaborator

too outdated, closing

@AntoineRelief AntoineRelief deleted the feat/AB#83059-remove-useless-graphql-fields-in-widget-queries branch June 3, 2024 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants