Convex Community

CC

Convex Community

Join the community to ask questions about Convex Community and get answers from other members.

Join

support-community

show-and-tell

general

self-hosted

announcements

Airbyte Convex Destination Connector - 404 Error

Hi, I'm trying to import a json file into Convex via the Airbyte integration Steps to Reproduce: 1. Set up the Convex destination connector in Airbyte. 2. Entered the Convex deployment URL from my Dev account: ...

Convex Auth with Google Provider

I managed to setup the Google provider for the Convex Auth, the problem I am facing is that whenever I try to render some UI based on the user auth state, it seems that is not working, it keeps showing the Google button, here is my code in Nextjs ```js "use client"; ...

Usage "function calls"

what are the cases that makes "function calls" to increase in the convex dashboard usage. My usage "function calls" went too high about 25 million even though no one is using the convex app.....

Airbyte 404 response on Convex destination

Hi, I am getting some weird 404 error in Airbyte when trying to export my Shopify data to Convex. I have followed the official guide to exporting to convex, with the deployment URL and API key, but I keep getting 404'd when it sets up the destination :/

using convex-ents mapping feature

how do i combine map with afilter or getX(index) . something like ```const team = ctx .table('teams') .get(ctx.viewerX().teamId) .map((t: Ent<'teams'>) => {...

http actions with abort signal

I am using the ai package from vercel and stream some llm output. I want to handle client disconnection with the abortSignal property when the user reloads the browser manually but it seems that convex http actions don't support it at the moment? I am using http actions with hono. Getting this error: "Not implemented: get signal for Request. Consider calling an action defined in Node.js instead (https://docs.convex.dev/functions/actions)." ```typescript...

Why calling an action from a client is an anti-pattern?

When then is good to use an action from client? If we need to write a mutation based on the response of a third party API, that's probably the unique case when we can call the action directly from the client? Context: A note in the docs ...

External Data Import to Convex with Dagster

I'm encountering issues when using the Convex Streaming Import API (/api/streaming_import/import_airbyte_records) to import data with relationships. I'm using Dagster to orchestrate the process, and I'm not using Airbyte directly. Specifically, I am trying to upsert records into four tables, tools, articleTools, materials, and articleMaterials tables with one json file. 1. Initial Setup:...

Is there a way to wait for what an internalAction returns?

I have a mutation that updates user data this mutation calls an internal action to update the user data in Clerk too. This action can fail sometimes, for example if an email doesnt meet all requirements. In this case we would need to catch the error in the action give it back to the mutation and then give it back to the client. How can I do that?

How to retrieve remaining rate limits from Convex's rateLimiter?

Hi! I'm trying to figure out how to get the remaining number of requests allowed with the rateLimiter component. When I use the rateLimiter.limit call, it only tells me whether the limit is OK (ok/retryAfter), but it doesn’t provide how many requests are left. I noticed that the rateLimiter component has a rateLimits table, which seems to contain the rate limit data. However, when I try to use a query to read this table, I can only access the data from the app component and not the rateLimiter component....

Query by array

How can I query and fetch all users given an array of walletAddresses? I have users table and each user has an optional walletAddress field. I need to fetch all users (at once) given the walletAddresses array...

search index multiple chained filter fields behaviour not as expected

Hi there, I have a schema that looks like this ```ts export const Destinations = Table("destinations", {...

Multiple Fields Names in Full Text Search

How can I add more fields to search index query both in schema creation and during the search. For example, `.searchIndex("search_name", {...

Aggregate (Convex Component) fails if multiple documents are added at once

If I add multiple documents at once, I get the following error: Documents read from or written to the "btreeNode" table changed while this mutation was being run and on every subsequent retry. Another call to this mutation changed the document with ID "j97257gsj6gkr786bghe6nd2zn772qjw". See https://docs.convex.dev/error#1 Adding them one by one does not trigger this error....

Request for better Swift Error Handling

As I've been setting up my app in Swift, I've been encountering this error:
Thread 3: Fatal error: 'try!' expression unexpectedly raised an error: Swift.DecodingError.typeMismatch(Swift.String, Swift.DecodingError.Context(codingPath: [], debugDescription: "Expected to decode String but found a dictionary instead.", underlyingError: nil))
Thread 3: Fatal error: 'try!' expression unexpectedly raised an error: Swift.DecodingError.typeMismatch(Swift.String, Swift.DecodingError.Context(codingPath: [], debugDescription: "Expected to decode String but found a dictionary instead.", underlyingError: nil))
...

Hey all, does anyone know if there is a Table helper equivalent for convex ENTs?

Trying to see if it's possible to collocate validators with schema definitions using the ENTs abstraction. For example, I am currently using the defineEnts method to define a table in my schema: ```events: defineEnt({...

Authenticating Http API

Calling mutations and queries created on a convex project using http api (mydomain.convex.cloud/api/query). I want to secure this endpoint on my convex project using cors to allow only my main application to talk with convex. Right now if I called this endpoint and specified a query or mutation name in the body I would be able to call it and get back results. I already checked the authentication part on convex docs, but what I need is my app to call this api only. So adding a constant bearer token on my main app is kinda useless.. Can anyone please help with this....

Paginated Queries correctly when multiple concurrent mutations

I need help implementing Paginated Queries correctly when multiple concurrent mutations (create, delete, and update operations) affect the record count and pagination cursor. Consider a ChatGPT-like interface with a list of messages. I'm using paginated queries to fetch the N most recent messages and display them to the user with an option to "Load earlier messages." When a user edits a message, the conversation restarts from that point. For example, in a chat with 100 messages where the last 20 are displayed due to pagination, editing message #85 would trigger two actions: the backend would delete all messages after #85, and the AI would generate a new response to the edited message. This would result in a chat containing 86 messages....

Feature Request: return the number the page is on in `.paginate()`

I've hit a use case where I need to know the total page number, Previous page number, and nextPage number, is there something I might be missing with results being returned from the query?...

Fetching another document's data via id in query

schema.ts ```ts import { authTables } from "@convex-dev/auth/server"; import { defineSchema, defineTable } from "convex/server"; import { v } from "convex/values";...