discord-questions.trpc.io/m/1087406790062391410

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

Linked Hostnames

5

Thumbnail

Search Engine Appearance

Google

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

Meta - unable to create default meta - tRPC

Trying to follow https://trpc.io/docs/server/metadata#default-meta-chaining-and-shallow-merging I set the type of the meta add it to the builder and want to set default but seems there is no typing for the meta in the create to set the default. Am I missing something ? ``` "@trpc/client": "10.16.0", "@trpc/react-query": "10.16.0", "@trpc/server": "10.16.0", ``` ``` type CreateContextOptions = { req: express.Request res: express.Response currentSchema: any } type MetaOptions = { roles: string[] } export const createInnerTRPCContext = async (opts: CreateContextOptions) => ({ req: opts.req, res: opts.res, currentSchema: opts.currentSchema, }) export const createTRPCContext = async ( opts: trpcExpress.CreateExpressContextOptions, ) => { const { req, res } = opts const currentSchema = req.locationSchemas?.find(({ id }) => id === req.schemaId) || {} return createInnerTRPCContext({ req, res, currentSchema, }) } const t = initTRPC .context<typeof createTRPCContext>() .meta<MetaOptions>() .create({ /// defaultMeta <------------------------- MISSING TYPING transformer: superjson, errorFormatter({ shape, ctx }) { const { data, ...rest } = shape return { ...rest, data: { ...data, traceId: ctx?.req?.traceId, schemaId: ctx?.req?.schemaId, }, } }, }) ```



Bing

Meta - unable to create default meta - tRPC

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

Trying to follow https://trpc.io/docs/server/metadata#default-meta-chaining-and-shallow-merging I set the type of the meta add it to the builder and want to set default but seems there is no typing for the meta in the create to set the default. Am I missing something ? ``` "@trpc/client": "10.16.0", "@trpc/react-query": "10.16.0", "@trpc/server": "10.16.0", ``` ``` type CreateContextOptions = { req: express.Request res: express.Response currentSchema: any } type MetaOptions = { roles: string[] } export const createInnerTRPCContext = async (opts: CreateContextOptions) => ({ req: opts.req, res: opts.res, currentSchema: opts.currentSchema, }) export const createTRPCContext = async ( opts: trpcExpress.CreateExpressContextOptions, ) => { const { req, res } = opts const currentSchema = req.locationSchemas?.find(({ id }) => id === req.schemaId) || {} return createInnerTRPCContext({ req, res, currentSchema, }) } const t = initTRPC .context<typeof createTRPCContext>() .meta<MetaOptions>() .create({ /// defaultMeta <------------------------- MISSING TYPING transformer: superjson, errorFormatter({ shape, ctx }) { const { data, ...rest } = shape return { ...rest, data: { ...data, traceId: ctx?.req?.traceId, schemaId: ctx?.req?.schemaId, }, } }, }) ```



DuckDuckGo

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

Meta - unable to create default meta - tRPC

Trying to follow https://trpc.io/docs/server/metadata#default-meta-chaining-and-shallow-merging I set the type of the meta add it to the builder and want to set default but seems there is no typing for the meta in the create to set the default. Am I missing something ? ``` "@trpc/client": "10.16.0", "@trpc/react-query": "10.16.0", "@trpc/server": "10.16.0", ``` ``` type CreateContextOptions = { req: express.Request res: express.Response currentSchema: any } type MetaOptions = { roles: string[] } export const createInnerTRPCContext = async (opts: CreateContextOptions) => ({ req: opts.req, res: opts.res, currentSchema: opts.currentSchema, }) export const createTRPCContext = async ( opts: trpcExpress.CreateExpressContextOptions, ) => { const { req, res } = opts const currentSchema = req.locationSchemas?.find(({ id }) => id === req.schemaId) || {} return createInnerTRPCContext({ req, res, currentSchema, }) } const t = initTRPC .context<typeof createTRPCContext>() .meta<MetaOptions>() .create({ /// defaultMeta <------------------------- MISSING TYPING transformer: superjson, errorFormatter({ shape, ctx }) { const { data, ...rest } = shape return { ...rest, data: { ...data, traceId: ctx?.req?.traceId, schemaId: ctx?.req?.schemaId, }, } }, }) ```

  • General Meta Tags

    6
    • title
      Meta - unable to create default meta - tRPC
    • charset
      utf-8
    • viewport
      width=device-width, initial-scale=1
    • next-size-adjust
    • description
      Trying to follow https://trpc.io/docs/server/metadata#default-meta-chaining-and-shallow-merging I set the type of the meta add it to the builder and want to set default but seems there is no typing for the meta in the create to set the default. Am I missing something ? ``` "@trpc/client": "10.16.0", "@trpc/react-query": "10.16.0", "@trpc/server": "10.16.0", ``` ``` type CreateContextOptions = { req: express.Request res: express.Response currentSchema: any } type MetaOptions = { roles: string[] } export const createInnerTRPCContext = async (opts: CreateContextOptions) => ({ req: opts.req, res: opts.res, currentSchema: opts.currentSchema, }) export const createTRPCContext = async ( opts: trpcExpress.CreateExpressContextOptions, ) => { const { req, res } = opts const currentSchema = req.locationSchemas?.find(({ id }) => id === req.schemaId) || {} return createInnerTRPCContext({ req, res, currentSchema, }) } const t = initTRPC .context<typeof createTRPCContext>() .meta<MetaOptions>() .create({ /// defaultMeta <------------------------- MISSING TYPING transformer: superjson, errorFormatter({ shape, ctx }) { const { data, ...rest } = shape return { ...rest, data: { ...data, traceId: ctx?.req?.traceId, schemaId: ctx?.req?.schemaId, }, } }, }) ```
  • Open Graph Meta Tags

    3
    • og:title
      Meta - unable to create default meta - tRPC
    • og:description
      Trying to follow https://trpc.io/docs/server/metadata#default-meta-chaining-and-shallow-merging I set the type of the meta add it to the builder and want to set default but seems there is no typing for the meta in the create to set the default. Am I missing something ? ``` "@trpc/client": "10.16.0", "@trpc/react-query": "10.16.0", "@trpc/server": "10.16.0", ``` ``` type CreateContextOptions = { req: express.Request res: express.Response currentSchema: any } type MetaOptions = { roles: string[] } export const createInnerTRPCContext = async (opts: CreateContextOptions) => ({ req: opts.req, res: opts.res, currentSchema: opts.currentSchema, }) export const createTRPCContext = async ( opts: trpcExpress.CreateExpressContextOptions, ) => { const { req, res } = opts const currentSchema = req.locationSchemas?.find(({ id }) => id === req.schemaId) || {} return createInnerTRPCContext({ req, res, currentSchema, }) } const t = initTRPC .context<typeof createTRPCContext>() .meta<MetaOptions>() .create({ /// defaultMeta <------------------------- MISSING TYPING transformer: superjson, errorFormatter({ shape, ctx }) { const { data, ...rest } = shape return { ...rest, data: { ...data, traceId: ctx?.req?.traceId, schemaId: ctx?.req?.schemaId, }, } }, }) ```
    • og:image
      https://discord-questions.trpc.io/og/post?id=1087406790062391410
  • Twitter Meta Tags

    4
    • twitter:card
      summary_large_image
    • twitter:title
      Meta - unable to create default meta - tRPC
    • twitter:description
      Trying to follow https://trpc.io/docs/server/metadata#default-meta-chaining-and-shallow-merging I set the type of the meta add it to the builder and want to set default but seems there is no typing for the meta in the create to set the default. Am I missing something ? ``` "@trpc/client": "10.16.0", "@trpc/react-query": "10.16.0", "@trpc/server": "10.16.0", ``` ``` type CreateContextOptions = { req: express.Request res: express.Response currentSchema: any } type MetaOptions = { roles: string[] } export const createInnerTRPCContext = async (opts: CreateContextOptions) => ({ req: opts.req, res: opts.res, currentSchema: opts.currentSchema, }) export const createTRPCContext = async ( opts: trpcExpress.CreateExpressContextOptions, ) => { const { req, res } = opts const currentSchema = req.locationSchemas?.find(({ id }) => id === req.schemaId) || {} return createInnerTRPCContext({ req, res, currentSchema, }) } const t = initTRPC .context<typeof createTRPCContext>() .meta<MetaOptions>() .create({ /// defaultMeta <------------------------- MISSING TYPING transformer: superjson, errorFormatter({ shape, ctx }) { const { data, ...rest } = shape return { ...rest, data: { ...data, traceId: ctx?.req?.traceId, schemaId: ctx?.req?.schemaId, }, } }, }) ```
    • twitter:image
      https://discord-questions.trpc.io/og/post?id=1087406790062391410
  • Link Tags

    11
    • canonical
      https://discord-questions.trpc.io/m/1087406790062391410
    • 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/2.png

Links

8