1

我的查询:imageList - 对象;我无法理解如何通过变量进行变异;

let query = `query _($type: NoteTypeEnum!, $imageList: ???){
    addNote(note: {
    imageList: [{  
       fileName: $fileName,
       url: $url,
       uuid: $uuid
    }]
    }) {}
}`;
4

1 回答 1

0

列表的类型用方括号定义,其中包含列表的类型,所以在你的情况下,我猜它应该是:

let query = `query _($type: NoteTypeEnum!, $imageList: [Json]){
addNote(note: {
imageList: [{  
   fileName: $fileName,
   url: $url,
   uuid: $uuid
}]
}) {}
}`;
于 2017-06-30T15:31:35.333 回答