属性' ConnectionField'在类型上不存在objectDefinitionBlock< query"

发布于 2025-02-06 16:43:28 字数 809 浏览 1 评论 0原文

我正在尝试构建这个项目,并且遇到了属性不存在的错误。

有什么问题?

https://www.prisma.io/blog/blog/fullstack--- nextjs-graphql-prisma-2-fwpc6ds155

./graphql/types/link.ts:20:7 类型错误:属性'ConnectionField'在类型'ObjectDefinitionBlock上不存在,<“ Query”>'。

18 |类型:“查询”, 19 |定义(t){

20 | T.ConnectionField('links',{ | ^ 21 |类型:链接, 22 |分析:async(_,{after,first},ctx)=> { 23 | const offset =之后? cursortoOffset(之后) + 1:0; 错误命令使用退出代码1失败。 信息访问 https://yarnpkg.com/en/docs/cli/cli/cli/run 有关此命令的文档。 Hanymorcos@hanys-Mbp Awesome-links%

I'm trying to build this project and I'm getting error that property doesn't exist.

What's the issue?

https://www.prisma.io/blog/fullstack-nextjs-graphql-prisma-2-fwpc6ds155

./graphql/types/Link.ts:20:7
Type error: Property 'connectionField' does not exist on type 'ObjectDefinitionBlock<"Query">'.

18 | type: 'Query',
19 | definition(t) {

20 | t.connectionField('links', {
| ^
21 | type: Link,
22 | resolve: async (_, { after, first }, ctx) => {
23 | const offset = after ? cursorToOffset(after) + 1 : 0;
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
hanymorcos@Hanys-MBP awesome-links %

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文