@@ -32,6 +32,12 @@ export interface IntrospectionOptions {
3232 * Default: false
3333 */
3434 inputValueDeprecation ?: boolean ;
35+
36+ /**
37+ * Whether target GraphQL server supports `@oneOf` input objects.
38+ * Default: false
39+ */
40+ inputObjectOneOf ?: boolean ;
3541}
3642
3743/**
@@ -45,6 +51,7 @@ export function getIntrospectionQuery(options?: IntrospectionOptions): string {
4551 directiveIsRepeatable : false ,
4652 schemaDescription : false ,
4753 inputValueDeprecation : false ,
54+ inputObjectOneOf : false ,
4855 ...options ,
4956 } ;
5057
@@ -62,6 +69,7 @@ export function getIntrospectionQuery(options?: IntrospectionOptions): string {
6269 function inputDeprecation ( str : string ) {
6370 return optionsWithDefault . inputValueDeprecation ? str : '' ;
6471 }
72+ const inputObjectOneOf = optionsWithDefault . inputObjectOneOf ? 'isOneOf' : '' ;
6573
6674 return `
6775 query IntrospectionQuery {
@@ -90,6 +98,7 @@ export function getIntrospectionQuery(options?: IntrospectionOptions): string {
9098 name
9199 ${ descriptions }
92100 ${ specifiedByUrl }
101+ ${ inputObjectOneOf }
93102 fields(includeDeprecated: true) {
94103 name
95104 ${ descriptions }
@@ -259,6 +268,7 @@ export interface IntrospectionInputObjectType {
259268 readonly name : string ;
260269 readonly description ?: Maybe < string > ;
261270 readonly inputFields : ReadonlyArray < IntrospectionInputValue > ;
271+ readonly isOneOf : boolean ;
262272}
263273
264274export interface IntrospectionListTypeRef <
0 commit comments