GraphQL模式和查询的假设策略
hypothesis-graphql的Python项目详细描述
图ql模式、查询和数据的假设策略。在
{/str}还不支持{/strong}一些功能。在
使用
对于不同的用例有两种策略。在
- 架构生成-hypothesis_graphql.strategies.schema()
- 查询-hypothesis_graphql.strategies.query(schema)。在
以这个模式为例:
type Book { title: String author: Author } type Author { name: String books: [Book] } type Query { getBooks: [Book] getAuthors: [Author] }
那么策略可以这样使用:
^{pr2}$- 项目
标签: