Bartholomeas
Bartholomeas
Explore posts from servers
PPrisma
Created by Bartholomeas on 8/21/2024 in #help-and-questions
Migrate sqlite to postgres
Im not as advanced in handling databases, but maybe it will not be that hard
5 replies
PPrisma
Created by Bartholomeas on 8/21/2024 in #help-and-questions
Migrate sqlite to postgres
Thanks! Ill check that tomorrow 😄
5 replies
TTCTheo's Typesafe Cult
Created by Bartholomeas on 4/6/2024 in #questions
Refetching/revalidating server query with TRPC
@Matvey Sorry for ping but similar question; maybe you know somethinf more? 😄
12 replies
TTCTheo's Typesafe Cult
Created by Bartholomeas on 4/6/2024 in #questions
Refetching/revalidating server query with TRPC
i mean there is no way to revalidate single request? 😐 So one awesome function of nextjs is not handled by trpc?
12 replies
TTCTheo's Typesafe Cult
Created by Bartholomeas on 4/6/2024 in #questions
Refetching/revalidating server query with TRPC
No description
12 replies
TTCTheo's Typesafe Cult
Created by Bartholomeas on 4/6/2024 in #questions
Refetching/revalidating server query with TRPC
Still not :/
12 replies
TTCTheo's Typesafe Cult
Created by Bartholomeas on 4/6/2024 in #questions
Refetching/revalidating server query with TRPC
I can do just "router.refresh()" but its kinda... workaround, not solution
12 replies
TTCTheo's Typesafe Cult
Created by Bartholomeas on 4/6/2024 in #questions
Refetching/revalidating server query with TRPC
as this satte is kind of dehydrated SSR state so i should be able to refetch that, riht?
12 replies
TTCTheo's Typesafe Cult
Created by Bartholomeas on 4/6/2024 in #questions
Refetching/revalidating server query with TRPC
export const PersonalizeText = () => {
const methods = useForm<z.infer<typeof TextElementConfigSchema>>({
defaultValues: DefaultTextElement,
resolver: zodResolver(TextElementConfigSchema),
});

const { getChosenElement, getIsDirty, setStateClear, changeTextElement } = useCardStylesStore();

const utils = api.useUtils();

const { mutate, isLoading } = api.card.updateTextElement.useMutation({
onSuccess: async input => {
setStateClear();
// await utils.card.getBusinessCard.invalidate({
// id: input.id,
// });
await utils.card.invalidate(undefined, { refetchType: "all" });
await utils.card.refetch();

console.log("success..", { input });
},
});
export const PersonalizeText = () => {
const methods = useForm<z.infer<typeof TextElementConfigSchema>>({
defaultValues: DefaultTextElement,
resolver: zodResolver(TextElementConfigSchema),
});

const { getChosenElement, getIsDirty, setStateClear, changeTextElement } = useCardStylesStore();

const utils = api.useUtils();

const { mutate, isLoading } = api.card.updateTextElement.useMutation({
onSuccess: async input => {
setStateClear();
// await utils.card.getBusinessCard.invalidate({
// id: input.id,
// });
await utils.card.invalidate(undefined, { refetchType: "all" });
await utils.card.refetch();

console.log("success..", { input });
},
});
Idk where im getting wrong :/
12 replies