Skip to content

Commit bdbdbb5

Browse files
committed
docs: Update README
1 parent 3985401 commit bdbdbb5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ GraphQL queries matching the schema:
2626
```python
2727
from hypothesis import given
2828
from hypothesis_graphql import from_schema
29+
import requests
2930

3031
# Strings and `graphql.GraphQLSchema` are supported
3132
SCHEMA = """
@@ -66,7 +67,9 @@ def test_graphql(query):
6667
# title
6768
# }
6869
# }
69-
...
70+
response = requests.post("http://127.0.0.1/graphql", json={"query": query})
71+
assert response.status_code == 200
72+
assert response.json().get("errors") is None
7073
```
7174

7275
It is also possible to generate queries or mutations separately with `hypothesis_graphql.queries` and `hypothesis_graphql.mutations`.

0 commit comments

Comments
 (0)