我在GraphQL和TypeScript小项目中有一个类型错误
错误说:类型'{args:{user_id:{type:graphqlscalartype< number,number>;;;;;;;;;;;;;;;;; }; user_name:{type:graphqlscalartype< string,string>;; }; bank_accounts:{type:graphqlscalartype< string,string>;; }; };解析(父:任何,Args:any):any; }'但在类型'graphqlfieldconfig< any,任何,任何>'中都需要。
11个字段:{addaccountdetails:create_user},
这是我的代码链接
https://drive.google.com/file/d/1xxa5rdqushzeppda3fgxd9l2cl8uiad0/view?usp = sharing?usp = sharing
如果您想下载并安装NPM模块,则可以检查。另外,我附上了错误图片。请查看这个非常基本的错误。
当我声明自己的类型帐户时,它在index.ts文件中显示错误文字。
在这里,我为帐户创建了一个新的GraphQl对象。
我想在红色文本中实现这一目标。我怎么能得到它?请帮我。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果要制作
bank_accounts
字符串数组,则应使用graphQllist
这样:另外,如果您打算将ID存储在数组中,则最好使用
graphqlid而不是
GraphQlString
。If you want to make
bank_accounts
string array you should useGraphQLList
like this:Also if you plan to store ids in the array it would be better to use
GraphQLID
instead ofGraphQLString
.