Sergio Visinoni
Sergio Visinoni
WWasp-lang
Created by Sergio Visinoni on 10/14/2024 in #đŸ™‹questions
Jobs workers to consume from a queue
I want to set up a jobs worker - or multiple workers - to fetch updated information from the OpenAI API when certain events occurr. The pattern I'd like to use is an event queue, rather than invoking the jobs worker directly from the TS code. Is this something possible with Wasp 0.15.0 or do I need to either to a cron job or stick with the exlicit trigger?
13 replies
WWasp-lang
Created by Sergio Visinoni on 10/5/2024 in #đŸ™‹questions
Is there a way to control timezone for dates ?
It looks like prisma is automatically converting timezones between the user's timezone and UTC when storig datetime on the database. Is there a way to add a more fine grained control, such as allowing users to specify their timezone and have all the dates reflect that whiule still being saved in UTC? I've been banging my head on it for a few hours today with no avail, and I was wondering if there is some wasp / prisma magic I need to be aware of. I'm using the OpenSaaS template
4 replies
WWasp-lang
Created by Sergio Visinoni on 10/4/2024 in #đŸ™‹questions
Username and Email field in the User model
I have a question regarding the User model, which I'm not sure it if's part of the standard Wasp setup or OpenSaaS specific. By default, they contain the user's email. I'd like the user to be able to change their username, as there is no need to repeat the same information twice, but I want to make sure it's safe to do so. What surprises me is that the username field in the User model is marked as @unique, which suggests it might be used for login purposes.
8 replies
WWasp-lang
Created by Sergio Visinoni on 10/2/2024 in #đŸ™‹questions
is there a way to customize the autogenerated fly.toml files for deploying on fly?
I followed the instructions to do a regular "automated" deployment with Fly, but I realized deploy comes with some assumptions such as redundant services etc that I don't really need when I'm setting up a staging environment. Based on what I've seen the fly.toml file is re-regerated in .wasp/build every time the command wasp deploy fly deploy is executed. Does it mean I need to manually deploy to Fly instead if I want to customize thier configuration?
11 replies
WWasp-lang
Created by Sergio Visinoni on 10/1/2024 in #đŸ™‹questions
Is there a recommended way to set up github actions for continuous delivering database migrations?
I want to set up proper CD in my project, starting from database migrations. Is there a recommended way to implement that with GitHub Actions, considering that I'll be deploying on Supabase?
5 replies
WWasp-lang
Created by Sergio Visinoni on 9/19/2024 in #đŸ™‹questions
Referencing entities via enums
Hello, though there is support for creating enums in schema.prisma, it does not look like there is a regular way to access them from JS/TS code as they don't seem to be exported as wasp entities in wasp/entities. For example, I've defined this enum: enum OneToOneMeetingStatus { SCHEDULED COMPLETED POSTPONED CANCELLED } It has been successfully created via migration, but when I try to import it into my code, I get this error '"wasp/entities"' has no exported member named 'OneToOneMeetingStatus'. Did you mean 'OneToOneMeeting'? I could not find any reference in the documentation
41 replies
WWasp-lang
Created by Sergio Visinoni on 9/17/2024 in #đŸ™‹questions
Best practices for splitting queries and operations
Hello, as I'm getting familiar with Wasp and OpenSaaS, I've hit a doubt I'd like to solve before I add too many functionalities to my project. Following the vertical feature structure in OpenSaaS, is it advised that I create operations.ts and query.ts under each functionality that requires them, or should I keep them in the top-level operations.ts and queries.ts files? To make it visual
src/
|
|-> feature1/
| [...]
|-> queries.ts <--- This?
|
| ...
|-> queries.ts <--- or everything here?
src/
|
|-> feature1/
| [...]
|-> queries.ts <--- This?
|
| ...
|-> queries.ts <--- or everything here?
I would assume that a good idea is to keep the feature-specific queries inside the feature folder and have all reusable ones available in the top-level file. Am I missing something important?
9 replies