Skip to content

Commit 9a2b0a2

Browse files
committed
Include kind in the types
Replicates graphql/graphql-js@2562ce01
1 parent f22ed58 commit 9a2b0a2

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

docs/usage/introspection.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The ``data`` attribute of the introspection query result now gives us a dictiona
2828
which constitutes a third way of describing a GraphQL schema::
2929

3030
{'__schema': {
31-
'queryType': {'name': 'Query'},
31+
'queryType': {'name': 'Query', 'kind': 'OBJECT'},
3232
'mutationType': None, 'subscriptionType': None,
3333
'types': [
3434
{'kind': 'OBJECT', 'name': 'Query', 'description': None,

src/graphql/utilities/get_introspection_query.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ def input_deprecation(string: str) -> Optional[str]:
5555
query IntrospectionQuery {{
5656
__schema {{
5757
{maybe_schema_description}
58-
queryType {{ name }}
59-
mutationType {{ name }}
60-
subscriptionType {{ name }}
58+
queryType {{ name kind }}
59+
mutationType {{ name kind }}
60+
subscriptionType {{ name kind }}
6161
types {{
6262
...FullType
6363
}}

tests/type/test_introspection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def executes_an_introspection_query():
2222
assert result.errors is None
2323
assert result.data == {
2424
"__schema": {
25-
"queryType": {"name": "SomeObject"},
25+
"queryType": {"name": "SomeObject", "kind": "OBJECT"},
2626
"mutationType": None,
2727
"subscriptionType": None,
2828
"types": [

tests/utilities/test_build_client_schema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ def throws_when_type_reference_is_missing_name():
687687
with raises(TypeError) as exc_info:
688688
build_client_schema(introspection)
689689

690-
assert str(exc_info.value) == "Unknown type reference: {}."
690+
assert str(exc_info.value) == "Unknown type reference: {'kind': 'OBJECT'}."
691691

692692
def throws_when_missing_kind():
693693
introspection = introspection_from_schema(dummy_schema)

0 commit comments

Comments
 (0)