edproton
CCConvex Community
•Created by edproton on 11/30/2024 in #support-community
Dynamic query builder in convex
I'm trying to do a dynamic query based on conditions
schema.ts
I get a huge error, sorry for the spam
and all the args need to be marked with
!
14 replies
CCConvex Community
•Created by edproton on 11/27/2024 in #support-community
Tanstack query with usePaginatedQuery is not working
I'm having trouble using TanStack Query's
usePaginatedQuery
. It doesn’t seem to behave as expected, and TypeScript is throwing errors. Here’s the code and the error I’m encountering:
Working Example
This works fine:
Problematic Code
However, in this usage:
I get the following TypeScript error:
Observations
- usePaginatedQuery
seems to expect two required arguments:
- A query function.
- Query arguments (e.g., an object representing the filters, pagination params, etc.).
- In the problematic code, it seems like TypeScript isn’t recognizing the query arguments or options properly, even though they’re provided.
Questions
1. Am I misunderstanding the correct way to use usePaginatedQuery
within convexQuery
or ensureQueryData
?
2. Is this related to how ensureQueryData
works or some conflict with convexQuery
?
3. Could this be a TypeScript inference issue, and if so, how can I resolve it?
4. Is usePaginatedQuery
still supported in the latest version of TanStack Query?
Any help or clarification would be greatly appreciated! If there’s a better pattern for combining usePaginatedQuery
with ensureQueryData
, I’d love to know!6 replies
CCConvex Community
•Created by edproton on 11/26/2024 in #support-community
Type inference is not ok. Is assuming the user properties are null
4 replies
CCConvex Community
•Created by edproton on 11/25/2024 in #support-community
I'm trying to upload data but it says Property 'store' does not exist on type 'StorageWriter'
How can I upload stuff?
I'm reading this https://docs.convex.dev/file-storage/store-files but the .store does not exists
"convex": "^1.17.2",
14 replies