Wasp-lang

W

Wasp-lang

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

Join

How to contribute to the SaaS template?

I have 10 micro SaaS applications that I am building. Have a few changes to make to the base SaaS which I think everyone could benefit from. What is the best way for me to provide the SaaS changes?

Wasp Deploy Client only to Flyio

Possible to deploy and upload only the client?

Customize Entity for Client and Server Function

Hi, New to Wasp and tried to use OpenSaaS.sh. I want to add a simple function like Count Button Click. It increases by one and the data is stored in the db every time a button is clicked. ...

if I don't use "www." then my app doesn't show

Hey folks (@kapa.ai in particular lol), if I use "www." to go to my app. then my app doesn't show up and I get the squarespace under construction page, but if I leave www. out then my app runs just fine. Any ideas what I could do to fix this?...

React Query questions

How are the cache keys handled under hood? Let's say I visited a page where user has a list of favorite items. Then the user visits an item's page. On this page, I could access the cache and if the item is in the list save an API call. But I couldn't access the query cache key. So I checked React Dev Tools, went to QueryClientProvider on components and checked client. QueryCache element is there; so clicked on it and found that it only contains the most recent page's queries cached. If I am on favorites page it will be something like: 1. ["auth/me"] 2. ["favorites-endpoint-url"]...

Github Oauth additional query parameters

Hello 馃憢 , I am having trouble to include additional query parameter inside Oauth flow using wasp. The default authorize call made by wasp generated src looks like https://github.com/login/oauth/authorize?response_type=code&client_id=xxx&state=xxx&scope=user%3Aemail and I need to specify additional parameter:redirect_uri (details https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/authorizing-oauth-apps#1-request-a-users-github-identity) However, the docs mentions only support for scopes using configFn -> https://wasp-lang.dev/docs/auth/social-auth/github#configfn-extimport Any ideas how to do that?...

Deployed /auth/me blocked by CORS policy

I've just deployed my app using wasp cli to fly.io but I get this error when opening my site from Google Chrome (works fine on Safari):
Access to XMLHttpRequest at 'https://foobar-server.fly.dev/auth/me' from origin 'https://www.foobar.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Access to XMLHttpRequest at 'https://foobar-server.fly.dev/auth/me' from origin 'https://www.foobar.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
I set environment variables and the email sender works just fine. Did I miss something?...

how to Re-hydrate query data ?

I want to call the query again every time my currentPage changes, but the way it's coded in the print example, the pages re-renders in a weird way and my pagination component doesn't work as expected.

Do I need to do something for the hot reload to work?

I've been trying to use the open saas template, but the hot reload isn't working for me. What do I need to do to make it work properly?

How to edit google oauth credits

I want to be able to edit the number of credits an account has, both locally and in prod, for google accounts, how can I do that. I know for normal email accounts I can use wasp db studio and edit

Issue with Stripe webhook testing using CLI

Hi, I am trying to test payment intent in local using Stripe CLI. I have followed both pages from the doc (Stripe Integration and Stripe Testing). But, when I am testing using the following command: stripe trigger payment_intent.succeeded --api-version 2022-11-15...

tsconfig paths alias

Hello, I added paths in tsconfig.json on the app like this ``` "baseUrl": ".", "paths": {...

Where are files stored after being uploaded to the file-upload page?

Sorry if this is a bad question, im just starting out as a web developer

How do you handle pagination with Wasp's useQuery?

I'd like to paginate my query but not sure on syntax or if it is supported. I see there's an old issue from 2021 here https://github.com/wasp-lang/wasp/issues/264 curious if others have found a way around it version: 0.14.0...

*/migrations should not be in .gitignore right?

Just noticed */migrations is in my gitignore and im pretty sure WASP auto put it there. That shouldnt be there right?...

Proper VSCode Intelisense

I'm having some problems when hovering new queries/actions created by me on the main.wasp. I'm using the openSaaS template and the existing actions works the vscode intelisense as expected. (Example Print of it working when hovering the getPaginatedUsers with ctrl hold) When doing the same with an action or query created by me, it doesn't works....
No description

React Query Defaults

What are the default settings in Wasp for React Query? For example, what is the cache item lifetime. Do I need to create cache keys or is it handled internally? Or is everything just React Query defaults and will reading React Query docs is sufficient? Thanks.

How: Dynamic Email Sender configuration

Is there a way to set the Email Sender config in main.wasp dynamically depending on environment? Would be great if we can import values from .env in main.wasp

When I made a custom api, I added user as an entity, but in the context it is empty

This is my main.wasp api socialPostMakerText { httpRoute: (POST, "/api/social-post-maker-text"), fn: import { getText } from "@src/server/socialMediaMakerPostText.js", entities: [User]...

Database migrations for production setup

What is the recommended way to update schema changes in a production setup? I'm assuming its migrations but I'm not sure if there is equivalent of "wasp db migration-dev" for production. Can you just run "wasp db migration-dev" for production? If so, in a docker setup, would you just ssh into the server instance and run it from there after you have deployed your new code?