Skip to content

Commit 5912f8f

Browse files
authored
DOC Add basic example result in README (#336)
1 parent ffdae96 commit 5912f8f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,13 @@ result = client.execute(query)
8282
print(result)
8383
```
8484

85+
Executing the above code should output the following result:
86+
87+
```
88+
$ python basic_example.py
89+
{'continents': [{'code': 'AF', 'name': 'Africa'}, {'code': 'AN', 'name': 'Antarctica'}, {'code': 'AS', 'name': 'Asia'}, {'code': 'EU', 'name': 'Europe'}, {'code': 'NA', 'name': 'North America'}, {'code': 'OC', 'name': 'Oceania'}, {'code': 'SA', 'name': 'South America'}]}
90+
```
91+
8592
> **WARNING**: Please note that this basic example won't work if you have an asyncio event loop running. In some
8693
> python environments (as with Jupyter which uses IPython) an asyncio event loop is created for you. In that case you
8794
> should use instead the [async usage example](https://gql.readthedocs.io/en/latest/async/async_usage.html#async-usage).

0 commit comments

Comments
 (0)