diff options
author | Samuel Newman <mozzius@protonmail.com> | 2023-11-30 17:11:51 +0000 |
---|---|---|
committer | Samuel Newman <mozzius@protonmail.com> | 2023-11-30 17:11:51 +0000 |
commit | b164f151cc352c62212a815e77dbdd23be530e7f (patch) | |
tree | 4df0df19dcd07afb1909171429ddc3ebcbfa42c5 /src/lib/react-query.ts | |
parent | ee5d7a63ce08f2b395c71fb35dbdb0d9bb0f1dee (diff) | |
parent | fcd22d4ccb0718db1c9b64fccd90a8bfe3e885d4 (diff) | |
download | voidsky-b164f151cc352c62212a815e77dbdd23be530e7f.tar.zst |
Merge remote-tracking branch 'upstream/main' into invite-code-warning
Diffstat (limited to 'src/lib/react-query.ts')
-rw-r--r-- | src/lib/react-query.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/react-query.ts b/src/lib/react-query.ts index 6b425d3b4..6ec620f74 100644 --- a/src/lib/react-query.ts +++ b/src/lib/react-query.ts @@ -8,6 +8,15 @@ export const queryClient = new QueryClient({ // so we NEVER want to enable this // -prf refetchOnWindowFocus: false, + // Structural sharing between responses makes it impossible to rely on + // "first seen" timestamps on objects to determine if they're fresh. + // Disable this optimization so that we can rely on "first seen" timestamps. + structuralSharing: false, + // We don't want to retry queries by default, because in most cases we + // want to fail early and show a response to the user. There are + // exceptions, and those can be made on a per-query basis. For others, we + // should give users controls to retry. + retry: false, }, }, }) |