返回主题:GraphQL 模式、查询与执行

知识卡片

普通读书笔记卡 · 3509.b

可执行模式绑定定义与解析器

理解等级:中级

模式文本经解析和校验后,需要与字段解析器的绑定一起组成可执行模式,GraphQL 服务才能按契约执行请求。若只加载类型定义而未绑定业务解析器,非空字段可能因无法提供值而报错。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    原书出处

    参考来源

    - 位置:《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 .