知识卡片

普通读书笔记卡 · 3503

SDL声明查询模式

理解等级:初级

GraphQL 模式用 Schema Definition Language(SDL)描述客户端可查询的数据类型及其字段,是接口的类型契约。查询执行时还需要服务端运行时解析字段;SDL 说明可请求什么,不自动提供数据。参见 [[GraphQL按需查询字段]]。

这张卡片看不懂?

已有反馈 · 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.