GraphQL 模式顶层的文档
Documentation at the top level of a GraphQL schema
我正在我的模式 (SDL) 中记录我的所有类型、字段和参数,包括顶部的 Query
和 Mutation
- 但我不知道如何添加整个架构的顶层文档。
我不确定它是规范还是工具 - 例如 Apollo 允许我编写 schema { }
,但不能在里面放任何东西,也不能在它之前放文档。
并且在文档中没有它的例子,特别是在 https://graphql.github.io/graphql-spec/June2018/#sec-Descriptions,它显示了一个没有顶级文档字符串的 "well-described" 模式。
这是规范没有涵盖的内容,还是只是工具?
与类型不同,SchemaDefinition
spec does not contain a Description
. The __Schema
introspection type 也没有 description
字段。因此无法设置或获取整个模式的描述。
然而,它是 upcoming feature。
我正在我的模式 (SDL) 中记录我的所有类型、字段和参数,包括顶部的 Query
和 Mutation
- 但我不知道如何添加整个架构的顶层文档。
我不确定它是规范还是工具 - 例如 Apollo 允许我编写 schema { }
,但不能在里面放任何东西,也不能在它之前放文档。
并且在文档中没有它的例子,特别是在 https://graphql.github.io/graphql-spec/June2018/#sec-Descriptions,它显示了一个没有顶级文档字符串的 "well-described" 模式。
这是规范没有涵盖的内容,还是只是工具?
与类型不同,SchemaDefinition
spec does not contain a Description
. The __Schema
introspection type 也没有 description
字段。因此无法设置或获取整个模式的描述。
然而,它是 upcoming feature。