#api does not generate

1 messages · Page 1 of 1 (latest)

hexed iceBOT
#

Hi @minor trellis. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Based on the information provided, there could be a few reasons why the api object does not include the queries and mutations for the chat table:

  1. Check your function exports: Ensure that the query and mutation functions in your chat.ts file are being exported correctly. If they are not exported, they will not be included in the api object.

  2. Check your file structure: The api object is generated based on the file structure of your convex directory. Make sure that your chat.ts file is located in the correct directory.

  3. Check for errors in your chat.ts file: If there are any syntax errors or other issues in your chat.ts file, it could prevent the api object from being generated correctly.

  4. Re-generate the api object: Sometimes, you may need to re-generate the api object for changes to take effect. You can do this by running the appropriate command in your terminal.

If you've checked all of these and are still having issues, it would be helpful to see the exact code and file structure you're working with.

For more information on how to use useQuery and useMutation hooks with the api object, you can refer to the Convex documentation (https://docs.convex.dev/tutorial/client#coding-with-the-convex-client).

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: