tRPC 响应附带的元是什么?

问题描述 投票:0回答:1

我正在进行一个 tRPC 调用,该调用返回大量带有日期的数据,在我得到的响应中:

json: {} // the actual thing I requested
meta: {} // why do I need this?

Meta 将是一个非常大的对象(~10mb),充满了以下内容:

0.createdAt: ['Date']
0.posts.0.createdAt: ['Date']
0.posts.0.releasedAt: ['Date']
0.posts.0.foo.0.createdAt: ['Date']
0.posts.0.foo.0.bar.0.createdAt: ['Date']
0.posts.0.foo.0.bar.0.updatedAt: ['Date']
0.posts.0.foo.0.bar.1.createdAt: ['Date']
0.posts.0.foo.0.bar.1.updatedAt: ['Date']
0.posts.0.foo.0.bar.2.createdAt: ['Date']
0.posts.0.foo.0.bar.2.updatedAt: ['Date']

有没有办法从回复中删除

meta:

javascript typescript trpc
1个回答
0
投票

它来自superjson,而不是trpc。您可以在没有数据转换器的情况下使用 trpc

© www.soinside.com 2019 - 2024. All rights reserved.