Hi @SimeonGriggs! Excited you’re taking Redwood for a spin. Sounds like the perfect kind of project to get up and running as well.
Here’s a couple threads with conversations about updating cells. Hopefully they can help with a next step:
It’s going well so far. My cell runs a query, and if the query returns empty, i have the Create mutation running inside the Empty component. (This is the “maybe in doing this in the wrong place/way part).
^^ If I understand correctly, I’m not sure I’d handle this within the component. Rather, I’d add a function to the Service that handles the “Hey, does this thing exist? Ok, then do this…” logic. You could likely use your existing query and mutation. Then all the Cell has to do is handle what’s returned instead of the logic + refresh (plus refresh-logic). You’d be creating a custom function similar to what is done in the Weather Cookbook for api/src/services/weather/weather.js
. Make sense? Helpful?
Feel free to post some code as well!