>我有一个架构类型页面,它有一个块数组:
{
title: 'Page',
name: 'page',
type: 'document',
fields: [
...
{
title: 'Blocks',
name: 'blocks',
type: 'array',
of: [
{type: 'tileGrid'},
{type: 'otherType'}
],
options: {
editModal: 'fullscreen'
}
}
]
}
类型tileGrid
具有以下字段:
{
title: 'Tiles',
name: 'tiles',
type: 'array',
of: [{
type: 'reference',
to: [
{type: 'tile'}
]
}]
}
所以tile
类型是深度嵌套page.blocks[].tiles[].tile
。如何查询page
并在同一查询中填写tile
引用?
由于磁贴是引用,因此需要取消引用运算符,而不是点运算符。这应该有效:page.blocks[].tiles[]->
.