17
17
except ImportError : # Python < 3.10
18
18
from typing_extensions import TypeAlias
19
19
20
-
21
20
__all__ = [
22
21
"IntrospectionDirective" ,
23
22
"IntrospectionEnumType" ,
@@ -44,6 +43,7 @@ def get_introspection_query(
44
43
directive_is_repeatable : bool = False ,
45
44
schema_description : bool = False ,
46
45
input_value_deprecation : bool = False ,
46
+ input_object_one_of : bool = False ,
47
47
) -> str :
48
48
"""Get a query for introspection.
49
49
@@ -55,6 +55,7 @@ def get_introspection_query(
55
55
maybe_specified_by_url = "specifiedByURL" if specified_by_url else ""
56
56
maybe_directive_is_repeatable = "isRepeatable" if directive_is_repeatable else ""
57
57
maybe_schema_description = maybe_description if schema_description else ""
58
+ maybe_input_object_one_of = "isOneOf" if input_object_one_of else ""
58
59
59
60
def input_deprecation (string : str ) -> str | None :
60
61
return string if input_value_deprecation else ""
@@ -87,6 +88,7 @@ def input_deprecation(string: str) -> str | None:
87
88
name
88
89
{ maybe_description }
89
90
{ maybe_specified_by_url }
91
+ { maybe_input_object_one_of }
90
92
fields(includeDeprecated: true) {{
91
93
name
92
94
{ maybe_description }
@@ -253,6 +255,7 @@ class IntrospectionEnumType(WithName):
253
255
class IntrospectionInputObjectType (WithName ):
254
256
kind : Literal ["input_object" ]
255
257
inputFields : list [IntrospectionInputValue ]
258
+ isOneOf : bool
256
259
257
260
258
261
IntrospectionType : TypeAlias = Union [
@@ -264,7 +267,6 @@ class IntrospectionInputObjectType(WithName):
264
267
IntrospectionInputObjectType ,
265
268
]
266
269
267
-
268
270
IntrospectionOutputType : TypeAlias = Union [
269
271
IntrospectionScalarType ,
270
272
IntrospectionObjectType ,
@@ -273,7 +275,6 @@ class IntrospectionInputObjectType(WithName):
273
275
IntrospectionEnumType ,
274
276
]
275
277
276
-
277
278
IntrospectionInputType : TypeAlias = Union [
278
279
IntrospectionScalarType , IntrospectionEnumType , IntrospectionInputObjectType
279
280
]
0 commit comments