知识卡片
SDL声明查询模式
GraphQL 模式用 Schema Definition Language(SDL)描述客户端可查询的数据类型及其字段,是接口的类型契约。查询执行时还需要服务端运行时解析字段;SDL 说明可请求什么,不自动提供数据。参见 [[GraphQL按需查询字段]]。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
原书出处
参考来源
- 位置:《Microservice APIs》第 8 章《Designing GraphQL APIs》(源文件:_epub-src/OEBPS/Text/08.htm)
- 结论依据:原文把 GraphQL API 规范称为 schema,指出其以 SDL 编写,并区分数据类型定义与服务器解析查询的运行时。
- 原始内容:A GraphQL API specification is called a schema, and it’s written in a standard called Schema Definition Language (SDL ). In this chapter, we will learn how to use the SDL to produce a specification for the products API.