在 GraphQL 模式文档注释中,如何链接到类型?

BoD*_*BoD 6 documentation markdown graphql

GraphQL 模式中的注释采用 Markdown 格式,因此您可以在其中添加链接。我希望评论中的一种类型有一个指向另一种类型的链接,以便文档的读者可以从一种类型浏览到另一种类型。

例如,我尝试过这个:

"""
A written or printed work consisting of pages glued or sewn together along one side and bound in covers.
A book has an [Author](Author).
"""
type Book {
    id: ID
    name: String
    author: Author
}
Run Code Online (Sandbox Code Playgroud)

在 GraphiQL 中,这已正确转换为链接,但目的地错误。

恐怕这不太可能,但我想我还是会问!:)

Dan*_*den 2

如果您静态生成文档,您可能会包含在该上下文中有效的相对链接。但是,GraphiQL 目前不支持对特定类型的深度链接,因此无法实现该功能。