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

Proposal for using Fragments with GraphQL queries #876

Draft
wants to merge 5 commits into
base: development
Choose a base branch
from

Conversation

howard-e
Copy link
Contributor

Continued discussion from #863 (comment):

@howard-e said:

I noticed quite some time ago, a LOT of the query params are often repeated. So much so that params are often missed in data update PRs, so I'm proposing to start writing the various individual component queries.js files as a construction of these repeated fragments.

... It's already cut down TestRun/queries.js by a significant amount ... I'm happy to revert and make this more of a concentrated task by itself.

@alflennik said:

I'm down with this. Most fields don't impact query performance so it's totally fine to just query all of them every time. For fields that do impact performance, like tests on TestPlanVersions and testResults on TestPlanRuns, I think it should be divided into two fragments to make accidentally tanking your performance less likely to happen. Something like TEST_PLAN_RUN_FIELDS and TEST_PLAN_RUN_TEST_RESULTS_FIELDS.

I think fields like renderableContent might be preferable to leave off, since they're extremely verbose and "specialty" for specific use cases. If it's there where it's not needed it will definitely make debugging responses harder.

We can manually add them where they're needed.

@howard-e howard-e added the enhancement New feature or request label Dec 14, 2023
@howard-e howard-e changed the base branch from main to development April 4, 2024 22:24
# Conflicts:
#	client/components/CandidateReview/CandidateTestPlanRun/queries.js
#	client/components/Reports/queries.js
#	client/components/TestRun/queries.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants