saito200
CCConvex Community
•Created by saito200 on 2/3/2024 in #support-community
Auth with chained actions and mutations?
I am finding it much simpler if I just do not use the scheduler at all and run actions directly from the client tbh, and only go out of the way to use the scheduler if I expect lots of reads and writes
10 replies
CCConvex Community
•Created by saito200 on 2/3/2024 in #support-community
Auth with chained actions and mutations?
@ian reusability. For example if I am reusing a query that gets the current user to filter records by user id
10 replies
CCConvex Community
•Created by saito200 on 2/3/2024 in #support-community
Auth with chained actions and mutations?
I find if I simply call the
processRaw
action from the client, everything works. Is it that when using the scheduler, the user auth is lost somehow?10 replies
CCConvex Community
•Created by saito200 on 2/3/2024 in #support-community
Auth with chained actions and mutations?
10 replies
CCConvex Community
•Created by saito200 on 2/3/2024 in #support-community
Auth with chained actions and mutations?
This is an example of pseudocode:
(continue)
10 replies
CCConvex Community
•Created by saito200 on 2/1/2024 in #support-community
How to use the result of a scheduled action?
the docs say to avoid calling an action directly from the client, and instead calling a mutation that schedules an action
In my case then it would be:
client -> public mutation -> run query to get a doc -> run scheduled action -> call third party API -> call internal mutation that writes to DB
it honestly feels a bit overcomplicated, I am doing a refactoring where before I simply called an action from the client that did everything
8 replies
CCConvex Community
•Created by whoami on 5/7/2023 in #support-community
Supporting cascades delete in convex?
I'm also trying to figure out the way to cascade delete records, e.g. the simplest case would be author and book tables, and if an author is deleted, all books that have a matching authorId would be deleted too
In my case I have multiple cascading levels though
I can do it with mutations that delete the author and then trigger mutations to delete the orphans
I could also do it with cron jobs that inspect the DB and clean up the orphans
I have the feeling that the first option would be ok, but I would like to know what is the "intended way" that has the "convex seal of approval", if any
6 replies