filtering documents with getPage
I'm looking at the
getPage
function so I can control the pagination more. But I can't seem to figure out how the filtering works. For example, I have a messages table that stores messages all the messages from many companies. However, I'm not sure how I would only include those results in the getPage return since I don't see a param that allows me to filter my index 🤔
eg this is my function right now and I only want the results with only a particular channelId and destinationId. How would I achieve this?
Thank you for any advice in advance!...Disable table
Hi! Is there any way to temporarily disble API calls? I somehow got a runaway function and its constantly uploading files to my _storage
Transient Error in Cron
We're seeing an error when our cron job runs:
The error message is:
'Transient error while executing action'
Action: actions/ai:checkAndRunScheduledReports...
Validation of (partial) Convex-schemas
I have a use-case where it would be super helpful to be able to call something like:
```
const schema = v.object({
"name": v.string()
});...
Querying api for status
Hey! Anyone know how to run an asynchronous job or something like that can run in the background while I return a value to the user first?
I've got this thing where I've got a prompt, generated using an LLM, I am currently calling this API within a convex action and now I need to pass this prompt to a text-to-image model.
Problem now is that inference can take quite a while and I don't want users to wait forever on the main page....
ActionRetrier docs
Is the ActionRetrier still being actively maintained? I'm trying to look for documentation but can't seem to find a unything up to date
Querying array fields in Convex
I have a question about querying array fields in Convex.
In my schema, articles have a 'tagIds' array field:
```
articles: defineTable({...
Issues running Convex Python client behind Docker
I'm running into an interesting issue while trying to utilize the Python sdk on a simple Flask application running on Gunicorn behind Docker.
First off, the application works perfectly fine when not behind Docker. Usage of the sdk is fine. However the moment I set the application up behind Docker, any requests using the sdk suddenly timeout and I just get a stacktrace pointing to the sdk function called.
Looking through the docs for the sdk I noticed that there are technically 2 client objects, a websocket based one and an http one, my guess is I'm not exposing whatever port the websocket is trying to communicate through as the http client appears to work fine. ...
Looking through the docs for the sdk I noticed that there are technically 2 client objects, a websocket based one and an http one, my guess is I'm not exposing whatever port the websocket is trying to communicate through as the http client appears to work fine. ...
Return more detailed errors to the client (Convex Auth)
I am using Convex Auth to authenticate the user. I'd like to return more detailed errors to the client (as they appear in the logs), maybe via a
throw new ConvexError
, is it possible?
I see in the Convex Dashboard, in the logs tab, that when a user enters the wrong password it is logged Invalid password
. I'd like to know this and return a specific error in the client rather than a specific one. But right now I don't know if it is possible to do this. Thanks!...E-Mail verification without a verification Link
Hey all.
Just started up the Free Plan and I wanted to add an additional e-mail account and make it my primary, but the e-mail verification that I get seems to be missing a verification link.
What am I missing? And is this the correct channel to ask this?...
Large record update strategy
I have about 10k rows of data that changes daily for my company’s core product. I’m looking to import that as part of a nightly cron job for an internal tool I’m building in Convex to demonstrate its potential. I expect 70% of the data to remain the same. 10% to be removed and 20% to be added.
I have an internal action to fetch the data nightly, but I’m unclear what next steps should be given that there’s no multi row functions in the Convex API.
Do I really have to delete every row or do a lookup based on my internal ID and then perform the mutation for every record? Seems a bit inefficient....
What is the recommended way to do encryption?
I’m trying to encrypt API keys into a document but I’m running into some issues. I wanted to use node:crypto but I need the node environment for that but that environment doesn’t allow mutations. So I tried using the web crypto module but that is not fully implemented so I can’t get that working either.
My other options are third-party libraries but crypto-js is deprecated and the alternatives seem unreliable
I need to decrypt the value again later, so I can’t encrypt on the client either....
Convex Node runtime vs Node
Hi! I have a code that works outside of Convex runtime. It is short and simple so I put here for reference. When this runs on Convex, I get "Connection lost while action was in flight" and the logs show "Your request couldn't be completed. Try again later." The latter seems like a response from one of the external services I'm using. However, running the same code, with the same API keys, outside of Convex works perfectly fine. Has anyone came by something like this before?
```ts
"use node";
...
App Remounts on Navigation with Tanstack Router + Convex Auth
I verified both Convex Auth and (Clerk + Convex) providers. For both solutions, it seems that the app unmounts for some reason between navigations until the auth state is determined. So even when I am authenticated and navigate between protected routes, the issue remains, and the isAuthenticated state is reset on page navigation.
_authed.tsx:
```tsx
import { createFileRoute, Navigate, Outlet } from '@tanstack/react-router';
import { Authenticated, Unauthenticated } from 'convex/react';...
Not finding Function? But i can see it in the dashboard...
Air-Alert-Starter $ npx convex run getMaskRecommendation '{"latitude": 37.7749, "longitude": -122.4194}'
✖ Failed to run function "getMaskRecommendation":
Error: [Request ID: 2bf512aecab915c6] Server Error
Could not find function for 'getMaskRecommendation'. Did you forget to run
npx convex dev
or npx convex deploy
?
...
Using Sentry integration with Datadog
I would love to use the sentry integration with Datadog (I understand that there is a Datadog log integration, but I think setting up Error tracking is actually easier using the Sentry SDK. I'm not an expert, so I don't know whether this would actually make sense in productionTM. Anyway...) Datadog supports the Sentry SDK, but you need to provide a service name, like this:
```Sentry.init({
dsn: "<DSN>",
initialScope: {
tags: {...
Table Aggregrate Component Question
```
likes: defineTable({
userId: v.id('users'),
parentId: v.union(
v.id('posts'),...
having problem authenticating when running the project in github codespaces
I am using convexAuth when i am running the project in github codespaces and try to auhtenticate or create a account in my project i am seeing this error
sign-up-card.tsx:47
POST https://musical-doodle-g455gvjr7wv73994v-3000.app.github.dev/api/auth 403 (Forbidden)
sign-up-card.tsx:50 SyntaxError: Unexpected token 'I', "Invalid origin" is not valid JSON...
Env variables being pushed automatically
Is something like this possible:
when running
npx convex dev
, variables in the following files inside the convex folder get pushed to the following deployments:
env.local
-> development
env.staging
-> preview...