-
Notifications
You must be signed in to change notification settings - Fork 62
feat: setup @tanstack/solid-query for data fetching, use in upload queue
#326
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
Merged
incognitojam
merged 53 commits into
commaai:master
from
greatgitsby:feat/tanstack-query
Mar 31, 2025
Merged
Changes from 49 commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
b9482b5
init after i broke the rebase
greatgitsby e6dbb00
more Solid-like
greatgitsby ab357ff
much cleaner component
greatgitsby 9465e24
back here make it less lines
greatgitsby cd026a2
this was test
greatgitsby 5f52864
one more
greatgitsby d014930
delete the suspense
greatgitsby 4e79db1
use mutation for cancel action
greatgitsby 91dd07f
drop query data if it fails
greatgitsby c79b205
fix
greatgitsby 9c53918
no need for clsx
greatgitsby 3728747
let offline queue poll until its empty
greatgitsby 5b07462
cleanup
greatgitsby 485427a
order import
greatgitsby 24df2ad
cleanup
greatgitsby bb8e71c
rename
greatgitsby 109a65f
split this change into a separate PR
greatgitsby fc0e781
inline this
greatgitsby 12b3f6f
back to before
greatgitsby ef69097
this should be span
greatgitsby 7641d11
back
greatgitsby 9a134c7
remove memoization
greatgitsby ebdb60e
move QueryClientProvider wrapper to AppLayout
greatgitsby aca2ef2
try fixing tests
greatgitsby 9502a2f
Revert "try fixing tests"
greatgitsby c4a0548
only establish the QueryClientProvider / devtools around App
greatgitsby 15ae348
feat: setup query client factory
greatgitsby d22e149
refactor: move queries into api
greatgitsby 6912cbc
reorganize import
greatgitsby 1397a4f
move query client to api
greatgitsby 04b6c78
didnt save in editor
greatgitsby 30bdf6e
refactor into query factory pattern
greatgitsby 6d239bd
not needed anymore
greatgitsby 0fd8999
just combine fields on decorated into same type
greatgitsby 2fe849d
extract to queue query file
greatgitsby 2d06de8
uploading messages bubble up first
greatgitsby 3bf7ac4
move
greatgitsby 325743d
lines
greatgitsby f26639a
same sort as before
greatgitsby 7c39cd6
test
greatgitsby 9d36fca
we dont even need to decorate on the obj
greatgitsby a0c64c4
type
greatgitsby a6863d8
move map to queue
greatgitsby 1bf612b
move declarations back to api
greatgitsby 20dbd44
formatting
greatgitsby f94b750
revert api changes, move queries to component, query client to api
greatgitsby 51a7a38
add back population of fields to stored objects
greatgitsby bf25d5a
dont destructure
greatgitsby 9676887
lower bundle size
greatgitsby 2490d3d
Merge remote-tracking branch 'origin/master' into feat/tanstack-query
incognitojam a1d3578
fix
incognitojam b9aef8a
Revert "fix"
incognitojam 5712463
fix2
incognitojam File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import { QueryClient } from '@tanstack/solid-query' | ||
| import { queries as uploadQueue } from '~/components/UploadQueue' | ||
|
|
||
| const pollingConfig = { retry: false, refetchInterval: 1000 } | ||
|
|
||
| export const getAppQueryClient = () => { | ||
| const queryClient = new QueryClient() | ||
|
|
||
| queryClient.setQueryDefaults(uploadQueue.online(), pollingConfig) | ||
| queryClient.setQueryDefaults(uploadQueue.offline(), pollingConfig) | ||
|
|
||
| return queryClient | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is this run in production? I also see we include the solid devtools plugin
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.
no. see first point in PR description
just checked again. i don't see the tanstack dev tools in prod
