【发布时间】:2018-11-21 05:04:46
【问题描述】:
我正在尝试将一组对象从 React 应用程序提供给 GraphQL。但是我收到了这个错误:
Error: The type of Mutation.reorderFields(fieldsOrder:) must be Input Type but got: [orderField].
这是我的架构:
reorderFields(
fieldsOrder:[orderField]
):Boolean!
变异:
type orderField{
order: Int,
myform: String,
id: String,
}
任何帮助将不胜感激,谢谢。
【问题讨论】:
-
但这不是说orderField的类型应该是boolean,还是我读错了?
-
@JaakkoKarhu :Boolean 是 reaorderFields() 的返回类型而不是输入类型。
标签: javascript graphql graphql-js