属性' ConnectionField'在类型上不存在objectDefinitionBlock< query"
我正在尝试构建这个项目,并且遇到了属性不存在的错误。
有什么问题?
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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论