Skyblue (Matt)
Skyblue (Matt)
CCConvex Community
Created by Skyblue (Matt) on 2/5/2025 in #support-community
Action context inside auth callback
Appreciate the help from both of you
13 replies
CCConvex Community
Created by Skyblue (Matt) on 2/5/2025 in #support-community
Action context inside auth callback
I will take a look at the scheduler, I haven't yet given that a whirl. In my head I was thinking that wasn't for one time events, so I hadn't even considered it.
13 replies
CCConvex Community
Created by Skyblue (Matt) on 2/5/2025 in #support-community
Action context inside auth callback
Yah thats what I was thinking. I'm not overly concerned about trying to optimize for the perf of it because its a one time event, but i do want to be able to code the invocation of the action in a way that reads like a trigger. I was tracking with the need to use an action, but I couldn't figure out how to run that action in that auth callback, and had an equal amount of luck getting trying to kickoff a mutation in the callback and calling an action from there. I guess, as I'm reading both of your responses I'm tracking that it isn't the right context to call actions from. I guess I was just hoping for some way to group the functionality together in a way that I would typically do from a backend function. 1. listen for record inserts on the users table 2. invoke special trigger action that... 3. calls 3rd party to create customer and portal link 4. patches user record with those fields (optional in the schema of course) 5. the user query on the client updates (this is already happening beautifully of course) 6. I redirect user to the link to pick a subscription After the successful sign up, the app stays in a loading state waiting for the record to have those fields. Ideal situation for me is that 2-3 are action, 4 is internal mutation called by that action, and i can associate that action with the createUser event in a way that's highly readable and associated closely with the file I'm using for the action and internal mutation.
13 replies
CCConvex Community
Created by Skyblue (Matt) on 2/5/2025 in #support-community
Action context inside auth callback
Oh...maybe i can just move that to a db trigger on the users table i guess?
13 replies
CCConvex Community
Created by Skyblue (Matt) on 2/5/2025 in #support-community
Action context inside auth callback
Oh that's kind of a bummer, I was expecting it to behave more like a trigger
13 replies
CCConvex Community
Created by Skyblue (Matt) on 1/17/2025 in #support-community
Apply generated document id to a non-system field in schema
Thanks @Tom and @Lee really appreciate the details explanations and scary quick responses. Maybe you are both reactive ai agents running on convex cough cough
47 replies
CCConvex Community
Created by Skyblue (Matt) on 1/17/2025 in #support-community
Apply generated document id to a non-system field in schema
hey this is a field you probably dont' care about" ifyou are returning these records directly to clients
I guess in my case, the client is based on different entites being queryable in a custom way defined by the user, so I have a need to bring that there so I can include a reference in the related documents
47 replies
CCConvex Community
Created by Skyblue (Matt) on 1/17/2025 in #support-community
Apply generated document id to a non-system field in schema
I bet a lot of folks would enjoy a chainable method on the query that feels similar to a select. But perhaps you all are trying to move away from that sort of pattern altogether intentionally.
47 replies
CCConvex Community
Created by Skyblue (Matt) on 1/17/2025 in #support-community
Apply generated document id to a non-system field in schema
Wow, this is kind of exciting actually. i think I was applying some sunk cost fallacy to all the time I've spent trying to get better at SQL but really wishing I could just do it all in JS. And clearly that's what I can do with Convex and I wasn't liking it. Ha!
47 replies
CCConvex Community
Created by Skyblue (Matt) on 1/17/2025 in #support-community
Apply generated document id to a non-system field in schema
So the performance is perhaps not the query, but on the transfer payload.
47 replies
CCConvex Community
Created by Skyblue (Matt) on 1/17/2025 in #support-community
Apply generated document id to a non-system field in schema
Oh....that is interesting.
47 replies
CCConvex Community
Created by Skyblue (Matt) on 1/17/2025 in #support-community
Apply generated document id to a non-system field in schema
So I guess I've made a habit of seeing post query transformations as less than ideal
47 replies
CCConvex Community
Created by Skyblue (Matt) on 1/17/2025 in #support-community
Apply generated document id to a non-system field in schema
(I know this isn't a trad db)
47 replies
CCConvex Community
Created by Skyblue (Matt) on 1/17/2025 in #support-community
Apply generated document id to a non-system field in schema
Perhaps this is hinting at the shallowness of my DB knowledge. I assumed that the select operation, especially only selecting a few is a way to improve the performance....and that querying the whole thing and THEN stripping out and renaming fields would be missing out on this performance.
47 replies
CCConvex Community
Created by Skyblue (Matt) on 1/17/2025 in #support-community
Apply generated document id to a non-system field in schema
It's 2 part: 1. I enjoy the ability to "select" fields, alias them if I want, or even exclude at query time 2. Iterating on them after returning could be slow unintentionally (like spreading new items, instead of updating properties on larger arrays)
47 replies
CCConvex Community
Created by Skyblue (Matt) on 1/17/2025 in #support-community
Apply generated document id to a non-system field in schema
I don't mind them in the dashboard. In fact, I think exposing them is a feature that signals to the dev about how things may be working behind the scenes. I think just having the ability to assign the id to a different field name as an alias would solve a bit for me. That way I don't have to transform every query or alias the property in the client just to avoid using underscores. I do want to avoid the habit of iterating on responses, just because that can very easily create some performance issues if not written carefully. The other tool is Triplit. Schema doc here: https://www.triplit.dev/docs/schemas
47 replies
CCConvex Community
Created by Skyblue (Matt) on 1/17/2025 in #support-community
Apply generated document id to a non-system field in schema
I get that. It's about control. Anytime I use a service or 3rd party lib, I'm generally averse to control limitations, especially when they aren't defined in a way that I would prefer.
47 replies
CCConvex Community
Created by Skyblue (Matt) on 1/17/2025 in #support-community
Apply generated document id to a non-system field in schema
Preference is to have control over the names of all the fields in my tables. But I'll settle functionally for #2
47 replies
CCConvex Community
Created by Skyblue (Matt) on 1/17/2025 in #support-community
Apply generated document id to a non-system field in schema
The other main tool I'm looking at expects the dev to define the id field...its one of the differentiators. Won't share what that tool is...in case that's a party foul (new to using discord for dev stuff)
47 replies
CCConvex Community
Created by Skyblue (Matt) on 1/17/2025 in #support-community
Apply generated document id to a non-system field in schema
So no way to apply the document id to another field on insert?
47 replies