在 GraphQL 中,我正在尝试创建 GeoJSON 对象类型。
当我指定 s 的 4 维数组GraphQLFloat
时,启动服务器时出现错误:
Error: Decorated type deeper than introspection query.
类型定义如下所示:
var GraphQLGeoJSON = new GraphQLObjectType({
name: 'GeoJSON',
fields: {
type: {
type: GraphQLString,
resolve: (obj) => obj.type,
},
coordinates: {
type: new GraphQLList(new GraphQLList(new GraphQLList(new GraphQLList(GraphQLFloat)))),
resolve: (obj) => obj.coordinates,
}
}
});
如何解决此错误?这是它在源代码中抛出的地方: