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: Fetch last update column in single gql query #4319

Merged
merged 7 commits into from
Oct 10, 2024

Conversation

connoratrug
Copy link
Contributor

@connoratrug connoratrug commented Oct 7, 2024

see https://preview-emx2-pr-4319.dev.molgenis.org/apps/central/#/

Replace n queries for n schema's with single fetch for all schema query to fetch lastUpdated table data

What are the main changes you did:

  • Add query to fetch the last updated event for each schema in a single query
  • Expose lastUpdate query via gql endpoint ( at db level, admin only)
  • update central app fontend
    • replace fetch for each schema with
    • single call to lastUpdate query

how to test:
go to central app

  • sign-in as non admin -> no last update data should be shown and no query should be fired
  • sign in as admin -> last update column should be shown, a single query should be fired to fetch the lastUpdate data, the schema's that have a changelog table show had a entry in the last update column showing the last change and a link to the details.

todo:

  • updated docs in case of new feature
  • added/updated tests
  • added/updated testplan to include a test for this fix, including ref to bug using # notation

- Add query to fetch the last updated event for each schema in a single query
- Expose lastUpdate query via gql endpoint ( at db level, admin only)
- update central app fontend
  - replace fetch for each schema with
  - single call to lastUpdate query
@connoratrug connoratrug marked this pull request as draft October 7, 2024 14:08
@connoratrug connoratrug marked this pull request as ready for review October 7, 2024 14:37
Copy link

sonarcloud bot commented Oct 9, 2024

@connoratrug connoratrug merged commit fe87336 into master Oct 10, 2024
6 checks passed
@connoratrug connoratrug deleted the feat/last-updated-schema-endpoint branch October 10, 2024 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants