@@ -32,6 +32,12 @@ export interface IntrospectionOptions {
32
32
* Default: false
33
33
*/
34
34
inputValueDeprecation ?: boolean ;
35
+
36
+ /**
37
+ * Whether target GraphQL server supports `@oneOf` input objects.
38
+ * Default: false
39
+ */
40
+ inputObjectOneOf ?: boolean ;
35
41
}
36
42
37
43
/**
@@ -45,6 +51,7 @@ export function getIntrospectionQuery(options?: IntrospectionOptions): string {
45
51
directiveIsRepeatable : false ,
46
52
schemaDescription : false ,
47
53
inputValueDeprecation : false ,
54
+ inputObjectOneOf : false ,
48
55
...options ,
49
56
} ;
50
57
@@ -62,6 +69,7 @@ export function getIntrospectionQuery(options?: IntrospectionOptions): string {
62
69
function inputDeprecation ( str : string ) {
63
70
return optionsWithDefault . inputValueDeprecation ? str : '' ;
64
71
}
72
+ const inputObjectOneOf = optionsWithDefault . inputObjectOneOf ? 'isOneOf' : '' ;
65
73
66
74
return `
67
75
query IntrospectionQuery {
@@ -90,6 +98,7 @@ export function getIntrospectionQuery(options?: IntrospectionOptions): string {
90
98
name
91
99
${ descriptions }
92
100
${ specifiedByUrl }
101
+ ${ inputObjectOneOf }
93
102
fields(includeDeprecated: true) {
94
103
name
95
104
${ descriptions }
@@ -259,6 +268,7 @@ export interface IntrospectionInputObjectType {
259
268
readonly name : string ;
260
269
readonly description ?: Maybe < string > ;
261
270
readonly inputFields : ReadonlyArray < IntrospectionInputValue > ;
271
+ readonly isOneOf : boolean ;
262
272
}
263
273
264
274
export interface IntrospectionListTypeRef <
0 commit comments