Re-add query editor for Gremlin#878
Conversation
a69b012 to
a689ac9
Compare
76d59de to
30d753e
Compare
| (data: FormData) => { | ||
| logger.debug("Executing query", data); | ||
| if (data.query !== queryText) { | ||
| setQueryText(data.query); |
There was a problem hiding this comment.
Just checking my understanding, this means that if the user given query was modified by fixing indentation and whitespace, the modified query will replace the given query in the text box?
There was a problem hiding this comment.
The original idea was that the query should only execute when the form is submitted (button is clicked) and if the query text was the same, we should refetch the query. Otherwise, TanStack Query wouldn't execute again because the text was the same. It would just give you the cached results.
It turns out it didn't work right. So the next PR is changing how all this works.
There was a problem hiding this comment.
The next PR, which will need to be rebased and re-targeted to this new trunk.
| explorer, | ||
| queryClient | ||
| ), | ||
| staleTime: 0, |
There was a problem hiding this comment.
What affect does this have on caching of query results?
There was a problem hiding this comment.
After a bit of researching just now, none.
My intent was to essentially "turn off" caching for this query, but that's not how TanStack Query works.
My next PR will change how all this works since it uses useMutation instead of useQuery, which does not even involve the cache.
There was a problem hiding this comment.
The next PR, which will need to be rebased and re-targeted to this new trunk.
This reverts commit 8ba8919.
30d753e to
8205539
Compare
|
Rebased the |
|
LGTM |
Description
This reverts commit 8ba8919.
This PR targets aws:main-query-editor branch instead of
main.I simply reverted the single commit from PR #862 and modified the changelog to account for conflicts. No other file had any conflicts, so they remain the same as when they were removed.
I also removed the feature flag since this is on its own branch, and updated the code to use Jotai instead of Recoil.
Validation
Related Issues
Check List
license.
pnpm checksto ensure code compiles and meets standards.pnpm testto check if all tests are passing.Changelog.md.