discord-questions.trpc.io/m/1339399284910456843

Preview meta tags from the discord-questions.trpc.io website.

Linked Hostnames

5

Thumbnail

Search Engine Appearance

Google

https://discord-questions.trpc.io/m/1339399284910456843

invalidate query - tRPC

whenever i add a user my user list is not updating ```tsx const mutation = trpc.user.addUser.useMutation(); async function onSubmit(values: z.infer<typeof formSchema>) { await mutation.mutateAsync(values); router.push("/admin/all-employees"); } ``` does not get updated ```tsx const { data: users, isLoading } = trpc.user.getUsers.useQuery(undefined, { refetchOnMount: false, refetchOnReconnect: false, }); ``` what i have tried : ```tsx const mutation = trpc.user.addUser.useMutation(["addUser"]); ``` searched for invalidate query but couldn't know how to setup a mutation key and invalidate it caused an error ```Type 'string[]' has no properties in common with type 'UseTRPCMutationOptions<{ name: string; email: string; username: string; password: string; role: string; }, TRPCClientErrorLike<{ input: { name: string; email: string; username: string; password: string; role: string; }; output: { user: { name: string; ... 9 more ...; | undefined;...'.ts(2559) ```



Bing

invalidate query - tRPC

https://discord-questions.trpc.io/m/1339399284910456843

whenever i add a user my user list is not updating ```tsx const mutation = trpc.user.addUser.useMutation(); async function onSubmit(values: z.infer<typeof formSchema>) { await mutation.mutateAsync(values); router.push("/admin/all-employees"); } ``` does not get updated ```tsx const { data: users, isLoading } = trpc.user.getUsers.useQuery(undefined, { refetchOnMount: false, refetchOnReconnect: false, }); ``` what i have tried : ```tsx const mutation = trpc.user.addUser.useMutation(["addUser"]); ``` searched for invalidate query but couldn't know how to setup a mutation key and invalidate it caused an error ```Type 'string[]' has no properties in common with type 'UseTRPCMutationOptions<{ name: string; email: string; username: string; password: string; role: string; }, TRPCClientErrorLike<{ input: { name: string; email: string; username: string; password: string; role: string; }; output: { user: { name: string; ... 9 more ...; | undefined;...'.ts(2559) ```



DuckDuckGo

https://discord-questions.trpc.io/m/1339399284910456843

invalidate query - tRPC

whenever i add a user my user list is not updating ```tsx const mutation = trpc.user.addUser.useMutation(); async function onSubmit(values: z.infer<typeof formSchema>) { await mutation.mutateAsync(values); router.push("/admin/all-employees"); } ``` does not get updated ```tsx const { data: users, isLoading } = trpc.user.getUsers.useQuery(undefined, { refetchOnMount: false, refetchOnReconnect: false, }); ``` what i have tried : ```tsx const mutation = trpc.user.addUser.useMutation(["addUser"]); ``` searched for invalidate query but couldn't know how to setup a mutation key and invalidate it caused an error ```Type 'string[]' has no properties in common with type 'UseTRPCMutationOptions<{ name: string; email: string; username: string; password: string; role: string; }, TRPCClientErrorLike<{ input: { name: string; email: string; username: string; password: string; role: string; }; output: { user: { name: string; ... 9 more ...; | undefined;...'.ts(2559) ```

  • General Meta Tags

    6
    • title
      invalidate query - tRPC
    • charset
      utf-8
    • viewport
      width=device-width, initial-scale=1
    • next-size-adjust
    • description
      whenever i add a user my user list is not updating ```tsx const mutation = trpc.user.addUser.useMutation(); async function onSubmit(values: z.infer<typeof formSchema>) { await mutation.mutateAsync(values); router.push("/admin/all-employees"); } ``` does not get updated ```tsx const { data: users, isLoading } = trpc.user.getUsers.useQuery(undefined, { refetchOnMount: false, refetchOnReconnect: false, }); ``` what i have tried : ```tsx const mutation = trpc.user.addUser.useMutation(["addUser"]); ``` searched for invalidate query but couldn't know how to setup a mutation key and invalidate it caused an error ```Type 'string[]' has no properties in common with type 'UseTRPCMutationOptions<{ name: string; email: string; username: string; password: string; role: string; }, TRPCClientErrorLike<{ input: { name: string; email: string; username: string; password: string; role: string; }; output: { user: { name: string; ... 9 more ...; | undefined;...'.ts(2559) ```
  • Open Graph Meta Tags

    3
    • og:title
      invalidate query - tRPC
    • og:description
      whenever i add a user my user list is not updating ```tsx const mutation = trpc.user.addUser.useMutation(); async function onSubmit(values: z.infer<typeof formSchema>) { await mutation.mutateAsync(values); router.push("/admin/all-employees"); } ``` does not get updated ```tsx const { data: users, isLoading } = trpc.user.getUsers.useQuery(undefined, { refetchOnMount: false, refetchOnReconnect: false, }); ``` what i have tried : ```tsx const mutation = trpc.user.addUser.useMutation(["addUser"]); ``` searched for invalidate query but couldn't know how to setup a mutation key and invalidate it caused an error ```Type 'string[]' has no properties in common with type 'UseTRPCMutationOptions<{ name: string; email: string; username: string; password: string; role: string; }, TRPCClientErrorLike<{ input: { name: string; email: string; username: string; password: string; role: string; }; output: { user: { name: string; ... 9 more ...; | undefined;...'.ts(2559) ```
    • og:image
      https://discord-questions.trpc.io/og/post?id=1339399284910456843
  • Twitter Meta Tags

    4
    • twitter:card
      summary_large_image
    • twitter:title
      invalidate query - tRPC
    • twitter:description
      whenever i add a user my user list is not updating ```tsx const mutation = trpc.user.addUser.useMutation(); async function onSubmit(values: z.infer<typeof formSchema>) { await mutation.mutateAsync(values); router.push("/admin/all-employees"); } ``` does not get updated ```tsx const { data: users, isLoading } = trpc.user.getUsers.useQuery(undefined, { refetchOnMount: false, refetchOnReconnect: false, }); ``` what i have tried : ```tsx const mutation = trpc.user.addUser.useMutation(["addUser"]); ``` searched for invalidate query but couldn't know how to setup a mutation key and invalidate it caused an error ```Type 'string[]' has no properties in common with type 'UseTRPCMutationOptions<{ name: string; email: string; username: string; password: string; role: string; }, TRPCClientErrorLike<{ input: { name: string; email: string; username: string; password: string; role: string; }; output: { user: { name: string; ... 9 more ...; | undefined;...'.ts(2559) ```
    • twitter:image
      https://discord-questions.trpc.io/og/post?id=1339399284910456843
  • Link Tags

    10
    • canonical
      https://discord-questions.trpc.io/m/1339399284910456843
    • icon
      https://cdn.answeroverflow.com/867764511159091230/6af104c7f0f39a12fcd55bd7bd28928f/icon.png
    • preload
      https://www.answeroverflow.com/_next/static/media/4f05ba3a6752a328-s.p.woff2
    • preload
      https://www.answeroverflow.com/_next/static/media/9cf9c6e84ed13b5e-s.p.woff2
    • preload
      /discord/0.png

Links

9