Skip to content

Commit 8066874

Browse files
committed
docs: Update README
1 parent 64157fe commit 8066874

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,27 @@
77
[![Chat](https://img.shields.io/discord/938139740912369755)](https://discord.gg/VnxfdFmBUp)
88
[![License](https://img.shields.io/pypi/l/hypothesis-graphql.svg)](https://opensource.org/licenses/MIT)
99

10-
Hypothesis strategies for GraphQL operations. Allows you to generate arbitrary GraphQL queries for the given schema.
11-
It starts with simple examples and iteratively goes to more complex ones.
10+
<h4 align="center">
11+
Generate queries matching your GraphQL schema, and use them to verify your backend implementation
12+
</h4>
1213

13-
For web API testing, [Schemathesis](https://github.com/schemathesis/schemathesis) provides a higher-level wrapper and can
14-
detect internal server errors.
14+
It is a Python library that provides a set of [Hypothesis](https://github.com/HypothesisWorks/hypothesis/tree/master/hypothesis-python) strategies that
15+
let you write tests parametrized by a source of examples.
16+
Generated queries have arbitrary depth and may contain any subset of GraphQL types defined in the input schema.
17+
They expose edge cases in your code that are unlikely to be found otherwise.
18+
19+
For web API testing, [Schemathesis](https://github.com/schemathesis/schemathesis) provides a higher-level wrapper around this library.
1520

1621
## Usage
1722

18-
`hypothesis_graphql` exposes the `from_schema` function, which takes a GraphQL schema and returns a Hypothesis strategy for
19-
defined queries and mutations:
23+
`hypothesis_graphql` provides the `from_schema` function, which takes a GraphQL schema and returns a Hypothesis strategy for
24+
GraphQL queries matching the schema:
2025

2126
```python
2227
from hypothesis import given
2328
from hypothesis_graphql import from_schema
2429

30+
# Strings and `graphql.GraphQLSchema` are supported
2531
SCHEMA = """
2632
type Book {
2733
title: String

0 commit comments

Comments
 (0)