I have problem searching with using Input data in graphql:
@RestController
@RequestMapping("/api/dictionary/")
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class DictionaryController {
    @Value("classpath:items.graphqls")
    private Resource schemaResource;
    private GraphQL graphQL;
    private final DictionaryService dictionaryService;
    @PostConstruct
    public void loadSchema() throws IOException {
        File schemaFile = schemaResource.getFile();
        TypeDefinitionRegistry registry = new SchemaParser().parse(schemaFile);
        RuntimeWiring wiring = buildWiring();
        GraphQLSchema schema = new SchemaGenerator().makeExecutableSchema(registry, wiring);
        graphQL = GraphQL.newGraphQL(schema).build();
    }
private RuntimeWiring buildWiring() {
            DataFetcher<String> fetcher9 = dataFetchingEnvironment ->
            getByInput((dataFetchingEnvironment.getArgument("example")));
        return RuntimeWiring.newRuntimeWiring()
                .type("Query", typeWriting ->
                   typeWriting
                    .dataFetcher("getByInput", fetcher9)
                    )
                .build();
    }
public String getByInput(Character character) {
    return "testCharacter";
}
  }
items.graphqls file content:
type Query {
   getByInput(example: Character): String
}
input Character {
    name: String
}
When asking for resource like that:
query {
    getByInput (example: {name: "aa"} )
}
Character DTO:
@NoArgsConstructor
@AllArgsConstructor
@Data
public class Character {
    protected String name;
}
I've got an error:
"Exception while fetching data (/getByInput) : java.util.LinkedHashMap cannot be cast to pl.graphql.Character",
How should the query look like?
Edit
If i change to:
public String getByInput(Object character) 
The codes runs fine - but i want convert to work.
 
    