@@ -270,7 +270,11 @@ default List<String> getAnnotations(MappingContext mappingContext, Type<?> type,
270270 }
271271
272272 default List <String > getAnnotations (MappingContext mappingContext , ExtendedDefinition <?, ?> extendedDefinition ) {
273- NamedNode def = extendedDefinition != null ? extendedDefinition .getDefinition () : null ;
273+ if (extendedDefinition == null ) {
274+ return Collections .emptyList ();
275+ }
276+
277+ NamedNode <?> def = extendedDefinition .getDefinition ();
274278 return getAnnotations (mappingContext , extendedDefinition .getName (), extendedDefinition .getName (), null ,
275279 extendedDefinition .getDirectives (), false , def );
276280 }
@@ -286,7 +290,7 @@ default List<String> getAnnotations(MappingContext mappingContext, String name)
286290 * @param def GraphQL definition
287291 * @return list of Jackson type id resolver annotations
288292 */
289- default List <String > getJacksonTypeIdAnnotations (MappingContext mappingContext , NamedNode def ) {
293+ default List <String > getJacksonTypeIdAnnotations (MappingContext mappingContext , NamedNode <?> def ) {
290294 List <String > defaults = new ArrayList <>();
291295 if (Boolean .TRUE .equals (mappingContext .getGenerateJacksonTypeIdResolver ())
292296 && def instanceof UnionTypeDefinition ) {
@@ -329,7 +333,7 @@ default List<String> getAdditionalAnnotations(MappingContext mappingContext, Str
329333 */
330334 default List <String > getAnnotations (MappingContext mappingContext , String graphQLTypeName , String name ,
331335 String parentTypeName , List <Directive > directives , boolean mandatory ,
332- NamedNode def ) {
336+ NamedNode <?> def ) {
333337 List <String > annotations = new ArrayList <>();
334338 if (mandatory ) {
335339 String possiblyPrimitiveType = mappingContext .getCustomTypesMapping ()
0 commit comments