Directus - 无法查询相关(一对多)集合

Directus - Unable to query related (One to Many) collection

一对多关系的 GraphQL 请求中不会返回相关集合。

我有 2 个集合 blogcomment 具有以下关系

blog     1 --> M  comment
comment  M --> 1  blog

映射是使用评论集合中的字段 blog_id 创建的。当我查询博客并尝试获取相关评论时,出现错误:

查询:

{
    blog {
        data {
            title
            comment {
                content
            }
        }
    }
}

错误:

"message": "Cannot query field \"content\" on type \"BlogItem\". Did you mean \"comment\"?",
"extensions": {
   "category": "graphql"
}

反之亦然。我的意思是,当我查询评论和相关博客时,它工作得很好。知道为什么吗?

注意:这是使用其网站上提供的 docker-compose yaml 示例在本地设置的,该示例连接到 mysql 数据库

这是 Directus 中的错误。由 this PR

修复