Skip to content

Commit 40ec510

Browse files
committed
docs: Adjust README
1 parent b572f20 commit 40ec510

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

README.md

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@ detect internal server errors.
1515

1616
## Usage
1717

18-
``hypothesis_graphql`` exposes the ``from_schema`` function, which takes a GraphQL schema and returns a Hypothesis strategy for
19-
defined queries and mutations.
18+
`hypothesis_graphql` exposes the `from_schema` function, which takes a GraphQL schema and returns a Hypothesis strategy for
19+
defined queries and mutations:
2020

21-
Lets take this schema as an example:
21+
```python
22+
from hypothesis import given
23+
from hypothesis_graphql import from_schema
2224

23-
```graphql
25+
SCHEMA = """
2426
type Book {
2527
title: String
2628
author: Author
@@ -40,15 +42,7 @@ type Mutation {
4042
addBook(title: String!, author: String!): Book!
4143
addAuthor(name: String!): Author!
4244
}
43-
```
44-
45-
Then you can generate queries or mutations like this:
46-
47-
```python
48-
from hypothesis import given
49-
from hypothesis_graphql import from_schema
50-
51-
SCHEMA = "..." # the one above
45+
"""
5246

5347

5448
@given(from_schema(SCHEMA))

0 commit comments

Comments
 (0)