问题描述
我正在尝试获取以下简单查询:
{duel{id,players}}
,我收到以下错误消息:
Field "players" of type "[User]" must have a selection of subfields. Did you mean "players { ... }
我的决斗类型结构:
const DuelType = new ObjectType({
name: 'Duel',fields: () => ({
id: { type: new NonNull(ID) },round_id: { type: IntType },status: { type: StringType },turn_of_user_id: { type: IntType },winner: { type: StringType },players: { type: new GraphQLList(UserType) },}),});
知道我缺少什么吗?
谢谢。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)