Scotty
Scotty
Explore posts from servers
TTCTheo's Typesafe Cult
Created by Scotty on 4/11/2023 in #questions
trpc call that doesn't use prisma
Hi, I need create a trpc endpoint that just calls openAI api. Is it possible to do this in an endpoint with using prisma? What does it look like?
2 replies
TTCTheo's Typesafe Cult
Created by Scotty on 2/5/2023 in #questions
looking for t3 project collaborators
Hi, I have several side projects (all in t3 stack) and I'm looking for collaborators. They are: - A daily writing challenge app - A focus and productivity app - A code snippets saver - A payment penalty if you are not productive app
Most of these are started and mapped out but not finished and I could use some help in getting through to the finish line. Please DM me if you are interested.
4 replies
TTCTheo's Typesafe Cult
Created by Scotty on 1/20/2023 in #questions
mutation.isSuccess not working
I have a submit function that when called, I want to do a mutation. If a successfull mutation, I want to do some action and if error I want to do a different action. My code currently is not catching the mutation.isSuccess even though there are no errors.
const submit = async () => {
await mutation.mutateAsync({
promptId: "123",
content: entryText,
});
if (mutation.isSuccess) {
setSuccess(true);
} else if (mutation.isError) {
setSuccess(false);
}
};
const submit = async () => {
await mutation.mutateAsync({
promptId: "123",
content: entryText,
});
if (mutation.isSuccess) {
setSuccess(true);
} else if (mutation.isError) {
setSuccess(false);
}
};
2 replies