-
-
Notifications
You must be signed in to change notification settings - Fork 216
Open
Description
Any ideas how to verify updates to those?
- Update graphene requirement from <3 to <4 #573
- Update graphql-server-core requirement from <2,>=1.2 to >=1.2,<3 #574
It will probably be a manual procedure until there are software tests covering some of the details? Those won't be enough, will they?
responder/tests/test_graphql.py
Lines 6 to 38 in a698eaa
| from responder.ext.graphql import GraphQLView | |
| @pytest.fixture | |
| def schema(): | |
| class Query(graphene.ObjectType): | |
| hello = graphene.String(name=graphene.String(default_value="stranger")) | |
| def resolve_hello(self, info, name): | |
| return f"Hello {name}" | |
| return graphene.Schema(query=Query) | |
| def test_graphql_schema_query_querying(api, schema): | |
| api.add_route("/", GraphQLView(schema=schema, api=api)) | |
| r = api.requests.get("http://;/?q={ hello }", headers={"Accept": "json"}) | |
| assert r.status_code == 200 | |
| assert r.json() == {"data": {"hello": "Hello stranger"}} | |
| def test_graphql_schema_json_query(api, schema): | |
| api.add_route("/", GraphQLView(schema=schema, api=api)) | |
| r = api.requests.post("http://;/", json={"query": "{ hello }"}) | |
| assert r.status_code < 300 | |
| assert r.json() == {"data": {"hello": "Hello stranger"}} | |
| def test_graphiql(api, schema): | |
| api.add_route("/", GraphQLView(schema=schema, api=api)) | |
| r = api.requests.get("http://;/", headers={"Accept": "text/html"}) | |
| assert r.status_code < 300 | |
| assert "GraphiQL" in r.text |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels