stoyko
stoyko
Explore posts from servers
TTCTheo's Typesafe Cult
Created by Thoo on 4/2/2024 in #questions
Extending next-auth user
You should mark your reply as the solution to your question, so that people in the future know it's solved and can reference it
6 replies
TTCTheo's Typesafe Cult
Created by Thoo on 4/2/2024 in #questions
Extending next-auth user
"I believe, by default, Drizzle only returns columns included in the table declaration that you pass to a select query. It doesn't do SELECT * FROM table, because it needs to get back the columns in a specific order. This is also a good way to avoid calling unnecessary data, which is good. What I don't understand is Internally, Auth.js (also known as Next Auth) Drizzle adapter passes its own table declarations to the queries. So even if your table declaration has more columns, the Drizzle adapter doesn't know about them. It's strange, but hey, as long as it works!
6 replies
TTCTheo's Typesafe Cult
Created by Thoo on 4/2/2024 in #questions
Extending next-auth user
Are you sure you get the displayName field from the db?
6 replies
TTCTheo's Typesafe Cult
Created by Holy Spirit Activist | John ☦ on 4/2/2024 in #questions
Handling loading and error states in T3
No problem. If you think your question is answered, mark it as solved.
10 replies
TTCTheo's Typesafe Cult
Created by Holy Spirit Activist | John ☦ on 4/2/2024 in #questions
Handling loading and error states in T3
Because you render a different component whenever you have isLoading set to true, which in your case, is in every single key stroke press. I would handle it by adding a debounce. This will allow you to type a much longer input before your spinner shows. Or change it so that the spinner is shown only in the content that sits wherever your data is shown. This way, you won't lose focus in your input field, while also showing a spinner on the page while searching
10 replies
TTCTheo's Typesafe Cult
Created by Holy Spirit Activist | John ☦ on 4/2/2024 in #questions
Handling loading and error states in T3
because you have an early return. You can try it without the spinner as well. Just setup a console.log('rerender'); and see how it updates on each keystroke
10 replies
TTCTheo's Typesafe Cult
Created by Holy Spirit Activist | John ☦ on 4/2/2024 in #questions
Handling loading and error states in T3
It does rerender, you just don't see it. What you might want to do is setup a debounce which will help you not send a request on each keystroke, but after a specific delay. https://www.developerway.com/posts/debouncing-in-react This is the first article I found in google about it, but I am sure you can find more information to help you
10 replies
TTCTheo's Typesafe Cult
Created by TayyabCodes on 12/22/2023 in #questions
Problem with react-hook-form
wait no, the other way around
22 replies
TTCTheo's Typesafe Cult
Created by TayyabCodes on 12/22/2023 in #questions
Problem with react-hook-form
22 replies
TTCTheo's Typesafe Cult
Created by ray1sx on 7/11/2023 in #questions
POST API endpoint only working if request made from POSTMAN
Good luck!
35 replies
TTCTheo's Typesafe Cult
Created by ray1sx on 7/11/2023 in #questions
POST API endpoint only working if request made from POSTMAN
no worries. Good luck troubleshooting further.
35 replies
TTCTheo's Typesafe Cult
Created by ray1sx on 7/11/2023 in #questions
POST API endpoint only working if request made from POSTMAN
Only other thing I can think of is setting up a repo where I can reproduce this, to see if I can debug it further.
35 replies
TTCTheo's Typesafe Cult
Created by ray1sx on 7/11/2023 in #questions
POST API endpoint only working if request made from POSTMAN
Have you tried doing a simple cURL request to the same URL? Just to see if it will give you the same error. It might be some header that Postman is adding, which you are missing here
35 replies
TTCTheo's Typesafe Cult
Created by ray1sx on 7/11/2023 in #questions
POST API endpoint only working if request made from POSTMAN
I am repeating myself here, but are you sure you are hitting the correct URL?
35 replies
TTCTheo's Typesafe Cult
Created by ray1sx on 7/11/2023 in #questions
POST API endpoint only working if request made from POSTMAN
Well, it isn't much, but can you try switching to a try/catch block, as it might be resolving differently, thus causing these requests in .then() not working
35 replies
TTCTheo's Typesafe Cult
Created by ray1sx on 7/11/2023 in #questions
POST API endpoint only working if request made from POSTMAN
Where are you deploying this app?
35 replies
TTCTheo's Typesafe Cult
Created by ray1sx on 7/11/2023 in #questions
POST API endpoint only working if request made from POSTMAN
Then the issue shouldn't be in the client API. Can you try removing the headers and see if that will work?
35 replies
TTCTheo's Typesafe Cult
Created by ray1sx on 7/11/2023 in #questions
POST API endpoint only working if request made from POSTMAN
And does the client API work if you do a curl reqeust or via postman directly?
35 replies
TTCTheo's Typesafe Cult
Created by ray1sx on 7/11/2023 in #questions
POST API endpoint only working if request made from POSTMAN
Cuz if it works from everywhere else, but your trpc procedure, it won't be something from the client API
35 replies
TTCTheo's Typesafe Cult
Created by ray1sx on 7/11/2023 in #questions
POST API endpoint only working if request made from POSTMAN
Might be something with the URL itself?
35 replies