Wasp-lang

W

Wasp-lang

Join the community to ask questions about Wasp-lang and get answers from other members.

Join

Problems with operations

I am trying to set up a simple crm foundation. I have added the schema entries and updated schema, i have added the routing and queries/actions to the wasp file, making sure to use the proper pathing - "@src/crm/operations" and routing: route CRMRoute { path: "/crm", to: CRMPage }...

Local file access in Query

Is it possible to read a local file in a query implementation defined in operations.ts ?

How to deploy existing wasp app to Electron for desktop application ?

HI, I have built a react app by using wasp SaaS method. I can run and use it by using browser and wasp commands. However, i have to deploy this application to desktop environment to make it downloadable and local. There are multiple feature such as AWS lambda calls in my app. I have install and create basic electron app but I don't know how to combine or move my app into this electron app. The folder structure and other stuffs are different than the vanilla react app and electron app therefore i...

Best way of adding a 404 page?

What's the optimum way of adding a 404 page to my wasp app - should I take the react router standard approach of a wildcard match as the last route listed?

Where is the complete API Reference in Open-Saas documentation / project?

I'm trying to understanding more about how the authentication providers works in open-saas. Because I want to get the refresh token of my google auth so i can reuse it in my backend app to access other libraries. Do you guys have something documented about this? I tried ```js export const onAfterLogin: OnAfterLoginHook = async ({ providerId, user, oauth, req}) => {...
No description

AWS file upload query cache invalidation after creation

Using version 0.14.2 on MacOS I have a query to get a team ``` query getTeamById {...

what is in essence the difference between a query and action

I have both queries and actions. I dont really understand the difference. Sometimes an action of mine checks if something exists in database and if it does it returns the already existing value and otherwhise it calculates it and appends it. Is this proper?...

Use another Database on Development

I have Docker running and I have several branches of my app. There are some variants in which I have to do wasp db migrate-dev and as there are fields that do not exist and others disappear, that database is completely deleted and when using the previous branch I no longer have data. How can I solve this? Is it possible to have several databases running in docker at the same time?...

Modify data in `onBeforeSignup` hook

Pretty much the title. Is this possible? My signup flow requires a key linked to a third party service, and the goal was to gather data via that service's API before inserting it into the database. I've got properties on my User model that I don't include in my auth flow for obvious reasons - what's the go here? Is there a good option here besides making the data optional and inserting it in an onAfterSignupHook instead? I presume I'll need to hit the api twice if so - once in onBeforeSignup to verify, and once again in onAfterSignup to add additional properties....

Can't make onAfterLogin work

Hello, I updated wasp because I need this specific hook in my project but I really can't make it work. Here is my app/src/auth/hooks.ts file:...

NextJS usePathname equivalent

Gday devs, I'm currently using client.rootComponent in a similar fashion to NextJS's layout.tsx however was there an alternative to usePathname()? Or do I need to patch together my own? Obviously window.location.pathname exists but it won't trigger a re-render upon navigation. Couldn't find anything in gh issues or on the docs, so reaching out here. Cheers!...

Integration of Alternative Payment Gateway

Hello everyone! If I wanted to integrate a payment gateway other than Stripe or Lemon Squeezy, what path should I take? Is there any example of a different integration? As I am new to the development world, I would appreciate any guidance you can provide. Thank you very much!...

Does wasp support preceeding route param eg. "/:lang/dashboard" ?

I want to have pages in different languages so i would like to set up the following routes: /:lang/dashboard /:lang/account ......

In saas project starter, why store uploadUrl in database

Here is a snippet from the Prisma file of https://wasp-lang.dev/blog/2024/01/30/open-saas-free-open-source-starter-react-nodejs Why does uploadUrl get stored? It expires after an hour, so seems like a waste of storage space. ``` model File {...

Refresh token is null

Hey! I am using the SaaS template with Google login. I would like to retrieve the refresh token in the onAfterLogin hook so that I can later authenticate to other Google libraries. Unfortunately, the refresh token seems to always be null, what am I doing wrong? Am I missing a configuration?

how do i fix this

❌ --- [Error] Your wasp project failed to compile: ------------------------------- - /projects/studyguided/main.wasp @ 30:14-19 Type error: Expected type: entity (declaration type)...

How do i fix this error

❌ --- [Error] Your wasp project failed to compile: ------------------------------- - /projects/studyguided/main.wasp @ 10:17-22 Type error: Expected type: entity (declaration type)...

Can you put a next.js app in wasp

Can you take a next.js app and put it directly into wasp with no issues. If so, how should it be done?

Go-live issue

Hello everyone, iI'm trying to go in PROD with my wasp/nodejs/react/flask/postgreSQL web application with Digital Ocean but in my site datanext.app i see just the favicon and the tab description, but all the page was completely blank. Please see my step bellow:...

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