You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's worth noting that the the "view function" of `GraphQLView` is contained in `GraphQLView.__call__`. So, when you create an instance, that instance is callable with the request object as the sole positional argument. To illustrate:
28
+
29
+
```python
30
+
gql_view = GraphQLView(schema=Schema, **kwargs)
31
+
gql_view(request) # <-- the instance is callable and expects a `aiohttp.web.Request` object.
32
+
```
23
33
24
34
### Supported options
25
35
-`schema`: The `GraphQLSchema` object that you want the view to execute when it gets a valid request.
@@ -40,17 +50,32 @@ This will add a `/graphql` endpoint to your app (customizable by passing `route_
40
50
-`enable_async`: whether `async` mode will be enabled.
41
51
42
52
43
-
License
44
-
-------
53
+
## Testing
54
+
Testing is done with `pytest`.
55
+
56
+
```bash
57
+
git clone https://github.com/dfee/aiohttp-graphql
58
+
cd aiohttp-graphql
59
+
# Create a virtualenv
60
+
python3.6 -m venv env &&source env/bin/activate # for example
61
+
pip install -e .[test]
62
+
pytest
63
+
```
64
+
65
+
The tests, while modeled after sanic-graphql's tests, have been entirely refactored to take advantage of `pytest-asyncio`, conform with PEP-8, and increase readability with pytest fixtures. For usage tests, please check them out.
66
+
45
67
46
-
Copyright for portions of project [aiohttp-graphql] are held by [Syrus Akbary] as part of project [flask-graphql]. All other claims to this project [aiohttp-graphql] are held by [Devin Fee].
68
+
## License
69
+
Copyright for portions of project [aiohttp-graphql] are held by [Syrus Akbary] as part of project [flask-graphql] and [sanic-graphql] as part of project [Sergey Porivaev]. All other claims to this project [aiohttp-graphql] are held by [Devin Fee].
0 commit comments