@@ -630,7 +630,7 @@ protected GraphQLFieldDefinition getField(Method method) throws GraphQLAnnotatio
630630 filter (p -> !DataFetchingEnvironment .class .isAssignableFrom (p .getType ())).
631631 map (parameter -> {
632632 Class <?> t = parameter .getType ();
633- graphql .schema .GraphQLType graphQLType = getInputObject (finalTypeFunction .buildType (t , parameter .getAnnotatedType ()), "Input " );
633+ graphql .schema .GraphQLType graphQLType = getInputObject (finalTypeFunction .buildType (t , parameter .getAnnotatedType ()), "" );
634634 return getArgument (parameter , graphQLType );
635635 }).collect (Collectors .toList ());
636636
@@ -696,11 +696,23 @@ protected static GraphQLFieldDefinition field(Method method) throws Instantiatio
696696
697697 }
698698
699+ public GraphQLInputObjectType getInputObject (Class <?> object ) {
700+ String typeName = getTypeName (object );
701+ if (typeRegistry .containsKey (typeName )) {
702+ return (GraphQLInputObjectType ) typeRegistry .get (typeName );
703+ } else {
704+ graphql .schema .GraphQLType graphQLType = getObject (object );
705+ GraphQLInputObjectType inputObject = (GraphQLInputObjectType ) getInputObject (graphQLType , "" );
706+ typeRegistry .put (inputObject .getName (), inputObject );
707+ return inputObject ;
708+ }
709+ }
710+
699711 @ Override
700712 public GraphQLInputType getInputObject (graphql .schema .GraphQLType graphQLType , String newNamePrefix ) {
701713 if (graphQLType instanceof GraphQLObjectType ) {
702714 GraphQLObjectType object = (GraphQLObjectType ) graphQLType ;
703- if (typeRegistry .containsKey (newNamePrefix + object .getName ())) {
715+ if (typeRegistry .containsKey (newNamePrefix + object .getName ()) && typeRegistry . get ( newNamePrefix + object . getName ()) instanceof GraphQLInputType ) {
704716 return (GraphQLInputType ) typeRegistry .get (newNamePrefix + object .getName ());
705717 }
706718 GraphQLInputObjectType inputObjectType = new GraphQLInputObjectType (newNamePrefix + object .getName (), object .getDescription (),
0 commit comments