@@ -95,7 +95,7 @@ function convertQuery(node: any, level: number, output: [string, number][], opti
95
95
const subFields = fieldCount > 0 ;
96
96
const argsExist = typeof value . __args === 'object' ;
97
97
const directivesExist = typeof value . __directives === 'object' ;
98
- const inlineFragmentsExist = typeof value . __on === 'object' ;
98
+ const inlineFragmentsExist = typeof value . __on === 'object' || typeof value . __on === 'string' ;
99
99
100
100
let token = `${ key } ` ;
101
101
@@ -135,6 +135,7 @@ function convertQuery(node: any, level: number, output: [string, number][], opti
135
135
convertQuery ( value , level + 1 , output , options ) ;
136
136
137
137
if ( inlineFragmentsExist ) {
138
+ if ( typeof value . __on === 'object' ) {
138
139
const inlineFragments : { __typeName : string } [ ]
139
140
= value . __on instanceof Array ? value . __on : [ value . __on ] ;
140
141
inlineFragments . forEach ( ( inlineFragment ) => {
@@ -143,6 +144,10 @@ function convertQuery(node: any, level: number, output: [string, number][], opti
143
144
convertQuery ( inlineFragment , level + 2 , output , options ) ;
144
145
output . push ( [ '}' , level + 1 ] ) ;
145
146
} ) ;
147
+ } else if ( typeof value . __on === 'string' ) {
148
+ const inlineFragment : string = value . __on ;
149
+ output . push ( [ `... ${ inlineFragment } ` , level + 1 ] ) ;
150
+ }
146
151
}
147
152
148
153
if ( subFields || inlineFragmentsExist ) {
0 commit comments