- Notifications
You must be signed in to change notification settings - Fork1.1k
chore: remove unecessary API.getWorkspaceParameters#20462
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Parkreiner left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
If I'm reading things right, the last major thing we'd need to do is update theDebugButton stories file to use these queries for the final story:
{key:[templateVersionRoot,MockWorkspace.latest_build.template_version_id,"richParameters",],data:[],},{key:["workspaceBuilds",MockWorkspace.latest_build.id,"parameters"],data:[],},
Though we have a few functions lying around that we can export in the query object files to make the setup a little less fragile
| } | ||
| returnvalue; | ||
| }); | ||
| constonlyMultableValues=templateVersionParameters |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Nit: there's a typo in the variable name
Parkreiner left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I think we're good to go
90b64c5 intomainUh oh!
There was an error while loading.Please reload this page.
I initially created
API.getWorkspaceParametersto group two related requests, but after revisiting the implementation, I realized this abstraction doesn’t add much value. It also prevents us from taking full advantage of React Query’s built-in caching and invalidation.So instead of grouping them, I removed the helper and replaced it with separate queries — this simplifies the flow and lets React Query handle caching more efficiently.
Related to#20431 (comment)