JakeLoew
WWasp-lang
•Created by JakeLoew on 11/5/2024 in #🙋questions
Is there a way to inject env variables into wasp testing?
I have code that throws an error if a value from
.env.server
is not present. This code runs on the server.
I can do something like MY_SECRET=abc123 wasp client test run
, but I'm wondering if there's a way to do it within the wasp api.13 replies
WWasp-lang
•Created by JakeLoew on 9/30/2024 in #🙋questions
Client Side Routing
I'm using a custom deployment strategy for the server and client following this approach from the wasp documentation. I have various routes defined--
/
, /my-dashboard
...etc. The pages render fine when you go to /
and navigate to them via links on the page. However you get 404'd when trying to load https://my-site.com/my-dashboard
, since they are SPA routes and there is no my-dashboard.html
--i.e. they are not genuine html routes. I'm not sure how to specify that the site is a SPA using client routing.9 replies
WWasp-lang
•Created by JakeLoew on 9/18/2024 in #🙋questions
How to update data coming from `useQuery`
Let's say you have the following code in an app that has a
model Author
as well as model Book
where each book belongs to one author...
What is a good pattern to update data coming from the getAuthor
query when a new book is created?12 replies
WWasp-lang
•Created by JakeLoew on 8/8/2024 in #🙋questions
find-or-create with social login -- SaaS template
Using the SaaS template, is there a way to get a sort of find-or-create behavior from social login? Take this case, for example: I go to /signup and signup with GitHub. I have an email [email protected]. If I try to go to /login and log in with google, the existing user should be found and logged in, no? What I’m seeing is that I get an error: “Save failed: user with the same identity already exists”.
Wasp v0.14.0
13 replies
WWasp-lang
•Created by JakeLoew on 7/24/2024 in #🙋questions
useQuery error handling
I'm wondering why
useQuery
from wasp/client/operations
doesn't handle errors as I expect. Consider the following:
The response from /operations-get-application-by-id
is always 404, yet no error is returned from useQuery
and isError
is always false
. status
is "loading"
39 replies
WWasp-lang
•Created by JakeLoew on 7/19/2024 in #🙋questions
migrate-dev failure when adding property to entity
Trying to perform a migration where I add an optional field to User, but since there already exist users in the DB the migration fails. For example:
Migrating from:
To:
run
wasp db migrate-dev
Fails with
Wasp version: 0.13.2 (entities defined in main.wasp
)30 replies
WWasp-lang
•Created by JakeLoew on 7/18/2024 in #🙋questions
Documentation for `login` action
5 replies