Mongodb GraphQL类型';对象';?

Mongodb GraphQL类型';对象';?,mongodb,mongoose,graphql,express-graphql,Mongodb,Mongoose,Graphql,Express Graphql,我有一个MongoDB mongoose模式,如下所示: const playerSchema = Schema({ conditions: { type : Object }, date: String }) 对于这样的集合: { _id: 5cee935cb56d5f794b452d78, conditions: { condition_a: [5.9, 6.0],

我有一个MongoDB mongoose模式,如下所示:

const playerSchema = Schema({                    
    conditions: { type : Object },                 
    date: String    
}) 
对于这样的集合:

{
 _id: 5cee935cb56d5f794b452d78,
 conditions:
 { 
    condition_a: [5.9, 6.0],
    condition_b: [6.1, 4.9],
    condition_c: [4.9, 4.0]
 },     
 date: 'Wed May 29 2019 16:45:00 GMT+0200 (GMT+02:00)',
},
{
 _id: 5cee935cb56d5f794b452d70,
 conditions:
 { 
    condition_a: [5.8, 6.1],        
    condition_c: [4.3, 3.0]
 },     
 date: 'Wed May 29 2019 16:47:00 GMT+0200 (GMT+02:00)',
},
[...]
我如何为它创建GraphQL模式? 我试过这样的东西

buildSchema(`
 type Player {
    _id: ID!    
    condition: Object         
    date: String         
 }
`)
也尝试过:
[[String]]
{}
{String}
。。。没有运气

使用与
玩家的条件和关系进行集合
不是一个选项。

解决方法:

type Condition {
    condition_a: [String],
    condition_b: [String],
    condition_c: [String],    
}

type Player {
    _id: ID!    
    condition: Condition         
    date: String         
 }