Skip to content

Conversation

@synoet
Copy link
Contributor

@synoet synoet commented Dec 7, 2025

  • start consolidation of queries into a single queries package
  • setup query-key-factory for better query key management
  • previously we did two seperate queries every time we opened an email. The first would fetch the first page of the thread and check access in the definition. The second would create a complicated resource with pagination. Both of these are now consolidated into a single tanstack query. Via useEmailThreadQuery and its imperative alternative fetchAndCacheEmail both preserve the original errors from the api client using conversion between MaybeResult and a throwable error. Since they use the same query hook and key, the initial fetch inside the block definition will pre-populate the same underlying query as the one in the email block.
  • add common email query and mutations, and port their original counterparts to use solid-query

@synoet synoet marked this pull request as ready for review December 8, 2025 23:18
@synoet synoet requested a review from a team as a code owner December 8, 2025 23:18
@synoet synoet requested review from dev-rb and peterchinman December 8, 2025 23:19
@synoet synoet merged commit 1006a32 into main Dec 9, 2025
18 checks passed
@synoet synoet deleted the synoet/queries-package-with-email branch December 9, 2025 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants