Search code examples
javagraphqlgraphql-java

graphql-java-annotations: Argument must be annotated with @GraphQLName, otherwise it would fail


If i don't add @GraphQLName("name"), then method would not be recognized correctly! (version: 0.13.2)

@GraphQLField
@GraphQLDataFetcher(MyDataFetcher.class)
public String findByName(@GraphQLName("name") String name){
    return null;
}

Solution

  • You need to compile your class with following javac option: -parameters

    More detailed you could refer my submitted issue on Github.