discord-questions.trpc.io/m/1274313296517795870

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

Linked Hostnames

4

Thumbnail

Search Engine Appearance

Google

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

Prefertch() privateProcedure (Clerk) in gSSP - tRPC

Trying to do that I'm getting "UNAUTHORIZED" error. I see that for creating **prefetchHelper** I use **createInnerTRPCContext** without passing auth data to it. Does it mean that it is impossible to fetch data from **privateProcedure** using **prefetchHelper** ? Or there are some recomendations how to do this with tRPC? (I know that I can just do Clerk auth check and make Prisma call after, but I want this data to be cached and passed to React-Query) ``` prefetchHelper.ts export const prefetchHelper = createServerSideHelpers({ router: appRouter, ctx: createInnerTRPCContext({}), transformer: superjson, // optional - adds superjson serialization }); ``` ``` trpc.ts export const createInnerTRPCContext = ({ auth, req }: AuthContext) => { return { auth, req, prisma, resend, }; }; export const createTRPCContext = (opts: CreateNextContextOptions) => { return createInnerTRPCContext({ auth: getAuth(opts.req), req: opts.req, }); }; ```



Bing

Prefertch() privateProcedure (Clerk) in gSSP - tRPC

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

Trying to do that I'm getting "UNAUTHORIZED" error. I see that for creating **prefetchHelper** I use **createInnerTRPCContext** without passing auth data to it. Does it mean that it is impossible to fetch data from **privateProcedure** using **prefetchHelper** ? Or there are some recomendations how to do this with tRPC? (I know that I can just do Clerk auth check and make Prisma call after, but I want this data to be cached and passed to React-Query) ``` prefetchHelper.ts export const prefetchHelper = createServerSideHelpers({ router: appRouter, ctx: createInnerTRPCContext({}), transformer: superjson, // optional - adds superjson serialization }); ``` ``` trpc.ts export const createInnerTRPCContext = ({ auth, req }: AuthContext) => { return { auth, req, prisma, resend, }; }; export const createTRPCContext = (opts: CreateNextContextOptions) => { return createInnerTRPCContext({ auth: getAuth(opts.req), req: opts.req, }); }; ```



DuckDuckGo

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

Prefertch() privateProcedure (Clerk) in gSSP - tRPC

Trying to do that I'm getting "UNAUTHORIZED" error. I see that for creating **prefetchHelper** I use **createInnerTRPCContext** without passing auth data to it. Does it mean that it is impossible to fetch data from **privateProcedure** using **prefetchHelper** ? Or there are some recomendations how to do this with tRPC? (I know that I can just do Clerk auth check and make Prisma call after, but I want this data to be cached and passed to React-Query) ``` prefetchHelper.ts export const prefetchHelper = createServerSideHelpers({ router: appRouter, ctx: createInnerTRPCContext({}), transformer: superjson, // optional - adds superjson serialization }); ``` ``` trpc.ts export const createInnerTRPCContext = ({ auth, req }: AuthContext) => { return { auth, req, prisma, resend, }; }; export const createTRPCContext = (opts: CreateNextContextOptions) => { return createInnerTRPCContext({ auth: getAuth(opts.req), req: opts.req, }); }; ```

  • General Meta Tags

    6
    • title
      Prefertch() privateProcedure (Clerk) in gSSP - tRPC
    • charset
      utf-8
    • viewport
      width=device-width, initial-scale=1
    • next-size-adjust
    • description
      Trying to do that I'm getting "UNAUTHORIZED" error. I see that for creating **prefetchHelper** I use **createInnerTRPCContext** without passing auth data to it. Does it mean that it is impossible to fetch data from **privateProcedure** using **prefetchHelper** ? Or there are some recomendations how to do this with tRPC? (I know that I can just do Clerk auth check and make Prisma call after, but I want this data to be cached and passed to React-Query) ``` prefetchHelper.ts export const prefetchHelper = createServerSideHelpers({ router: appRouter, ctx: createInnerTRPCContext({}), transformer: superjson, // optional - adds superjson serialization }); ``` ``` trpc.ts export const createInnerTRPCContext = ({ auth, req }: AuthContext) => { return { auth, req, prisma, resend, }; }; export const createTRPCContext = (opts: CreateNextContextOptions) => { return createInnerTRPCContext({ auth: getAuth(opts.req), req: opts.req, }); }; ```
  • Open Graph Meta Tags

    3
    • og:title
      Prefertch() privateProcedure (Clerk) in gSSP - tRPC
    • og:description
      Trying to do that I'm getting "UNAUTHORIZED" error. I see that for creating **prefetchHelper** I use **createInnerTRPCContext** without passing auth data to it. Does it mean that it is impossible to fetch data from **privateProcedure** using **prefetchHelper** ? Or there are some recomendations how to do this with tRPC? (I know that I can just do Clerk auth check and make Prisma call after, but I want this data to be cached and passed to React-Query) ``` prefetchHelper.ts export const prefetchHelper = createServerSideHelpers({ router: appRouter, ctx: createInnerTRPCContext({}), transformer: superjson, // optional - adds superjson serialization }); ``` ``` trpc.ts export const createInnerTRPCContext = ({ auth, req }: AuthContext) => { return { auth, req, prisma, resend, }; }; export const createTRPCContext = (opts: CreateNextContextOptions) => { return createInnerTRPCContext({ auth: getAuth(opts.req), req: opts.req, }); }; ```
    • og:image
      https://discord-questions.trpc.io/og/post?id=1274313296517795870
  • Twitter Meta Tags

    4
    • twitter:card
      summary_large_image
    • twitter:title
      Prefertch() privateProcedure (Clerk) in gSSP - tRPC
    • twitter:description
      Trying to do that I'm getting "UNAUTHORIZED" error. I see that for creating **prefetchHelper** I use **createInnerTRPCContext** without passing auth data to it. Does it mean that it is impossible to fetch data from **privateProcedure** using **prefetchHelper** ? Or there are some recomendations how to do this with tRPC? (I know that I can just do Clerk auth check and make Prisma call after, but I want this data to be cached and passed to React-Query) ``` prefetchHelper.ts export const prefetchHelper = createServerSideHelpers({ router: appRouter, ctx: createInnerTRPCContext({}), transformer: superjson, // optional - adds superjson serialization }); ``` ``` trpc.ts export const createInnerTRPCContext = ({ auth, req }: AuthContext) => { return { auth, req, prisma, resend, }; }; export const createTRPCContext = (opts: CreateNextContextOptions) => { return createInnerTRPCContext({ auth: getAuth(opts.req), req: opts.req, }); }; ```
    • twitter:image
      https://discord-questions.trpc.io/og/post?id=1274313296517795870
  • Link Tags

    9
    • canonical
      https://discord-questions.trpc.io/m/1274313296517795870
    • 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

6