知识卡片
可执行模式绑定定义与解析器
模式文本经解析和校验后,需要与字段解析器的绑定一起组成可执行模式,GraphQL 服务才能按契约执行请求。若只加载类型定义而未绑定业务解析器,非空字段可能因无法提供值而报错。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
原书出处
参考来源
- 位置:《Microservice APIs》第 10 章《Building GraphQL APIs with Python》(源文件:_epub-src/OEBPS/Text/10.htm)
- 结论依据:原文把 QueryType 的 hello 解析器传给 make_executable_schema,并说明只声明查询时默认结果为 null。
- 原始内容:To make Ariadne aware of our resolvers, we need to pass our bindable objects as an array to the make_executable_ schema() function .