lee
CCConvex Community
•Created by truered8 on 4/21/2025 in #support-community
Call query once (alternative to `fetchQuery`)
const convex = useConvex();
const result = await convex.query(...)
4 replies
CCConvex Community
•Created by too_easy on 4/10/2025 in #support-community
CONVEX_SITE_URL undefined in functions?
Yeah this is because ctx.runQuery is designed to be used with components (convex.dev/components), which do not have access to CONVEX_SITE_URL (because they don't know where their http actions will be exposed).
We recommend you call a helper function instead of doing ctx.runQuery https://docs.convex.dev/understanding/best-practices#use-helper-functions-to-write-shared-code
5 replies
CCConvex Community
•Created by AlphaOmega on 4/5/2025 in #support-community
TS2589: Type instantiation is excessively deep and possibly infinite.
15 replies
CCConvex Community
•Created by Alvi on 3/24/2025 in #support-community
paginated query with status
you can use
new EmptyStream(order, fields)
or new SingletonStream(null, order, fields, field.map(() => null), [])
to represent a stream with no elements. (the reason mergedStreams
can't do that automatically is it doesn't know the order).6 replies
CCConvex Community
•Created by Nic on 3/30/2025 in #support-community
Searching two columns
To concat columns you can do this https://stack.convex.dev/triggers#denormalizing-a-field
or you can do the equivalent of LIKE % in an RDBMS which is to read all the data and filter
8 replies
CCConvex Community
•Created by Shinyballs on 3/29/2025 in #self-hosted
hi all, im sure it's something pretty
port 6791 is the dashboard, 3210 is the backend
16 replies
CCConvex Community
•Created by Shinyballs on 3/29/2025 in #self-hosted
hi all, im sure it's something pretty
The CONVEX_CLOUD_ORIGIN (and CONVEX_SITE_ORIGIN) should use the backend url, not the dashboard url
16 replies
CCConvex Community
•Created by Clever Tagline on 3/28/2025 in #support-community
Paginated indexed query with multiple index choices?
withSearchIndex doesn't work on streams (i think @ian was talking about that elsewhere)
8 replies
CCConvex Community
•Created by Clever Tagline on 3/28/2025 in #support-community
Paginated indexed query with multiple index choices?
at runtime it would throw an error so i'm kind of glad typescript complains
8 replies
CCConvex Community
•Created by Clever Tagline on 3/28/2025 in #support-community
Paginated indexed query with multiple index choices?
Looks good to me. Great that you found it!
8 replies
CCConvex Community
•Created by jabra on 3/19/2025 in #general
Hi All,
I published the articles https://stack.convex.dev/merging-streams-of-convex-data and https://stack.convex.dev/translate-sql-into-convex-queries
41 replies
CCConvex Community
•Created by DylanDev on 3/20/2025 in #support-community
Patching two values in a document causes functions to be re triggered
here's an example of using it https://github.com/get-convex/aggregate/blob/41e443347dbe1c084f112da7311ffb402509e9da/example/convex/shuffle.ts#L84
15 replies
CCConvex Community
•Created by DylanDev on 3/20/2025 in #support-community
Patching two values in a document causes functions to be re triggered
it looks like the pokemon example still uses Math.random in the query; it doesn't use the seed. i think this library works https://www.npmjs.com/package/rand-seed
15 replies
CCConvex Community
•Created by DylanDev on 3/20/2025 in #support-community
Patching two values in a document causes functions to be re triggered
alternatively, you could choose to just run the query once, not rerun it whenever the data changes. you can do this with
const convex = useConvex()
and then on page load (like in a useEffect
) call const levels = await convex.query(...);
15 replies
CCConvex Community
•Created by DylanDev on 3/20/2025 in #support-community
Patching two values in a document causes functions to be re triggered
convex queries rerun when the data they read changes. so this makes sense. to fix, i would avoid calling Math.random from the query and instead pass in the random seed as an argument. That way, when the query reruns, it will pick the same levels again.
15 replies
CCConvex Community
•Created by RJ on 3/18/2025 in #support-community
Increased incidences of generic failure + warning
btw there's a reason i didn't feel comfortable just reverting my original change: the old behavior in this case was that the HTTP action wouldn't show up in the execution log at all (whether they succeeded or failed). My original change just made such issues louder.
81 replies
CCConvex Community
•Created by RJ on 3/18/2025 in #support-community
Increased incidences of generic failure + warning
and for helping get a repro
81 replies
CCConvex Community
•Created by RJ on 3/18/2025 in #support-community
Increased incidences of generic failure + warning
thank you for reporting!
81 replies
CCConvex Community
•Created by RJ on 3/18/2025 in #support-community
Increased incidences of generic failure + warning
hmm there is another case where it could happen, if Content-Length is 0. putting up a fix for that too
81 replies