File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
packages/plugins/other/visitor-plugin-common/src Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -965,19 +965,16 @@ export class SelectionSetToObject<Config extends ParsedDocumentsConfig = ParsedD
965965 const schemaType = this . _schema . getType ( typeName ) ;
966966
967967 // Check if current selection set has inline fragments (e.g., "... on AppNotification")
968- const hasInlineFragments =
969- this . _selectionSet ?. selections ?. some ( selection => selection . kind === Kind . INLINE_FRAGMENT ) ?? false ;
968+ const hasFragment =
969+ this . _selectionSet ?. selections ?. some (
970+ selection => selection . kind === Kind . INLINE_FRAGMENT || selection . kind === Kind . FRAGMENT_SPREAD
971+ ) ?? false ;
970972
971973 // When the parent schema type is an interface:
972974 // - If we're processing inline fragments, use the concrete type name
973975 // - If we're processing the interface directly, use the interface name
974976 // - If we're in a named fragment, always use the concrete type name
975- if (
976- isObjectType ( schemaType ) &&
977- this . _parentSchemaType &&
978- isInterfaceType ( this . _parentSchemaType ) &&
979- ! hasInlineFragments
980- ) {
977+ if ( isObjectType ( schemaType ) && this . _parentSchemaType && isInterfaceType ( this . _parentSchemaType ) && ! hasFragment ) {
981978 return `${ parentName } _${ this . _parentSchemaType . name } ` ;
982979 }
983980
You can’t perform that action at this time.
0 commit comments