You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been using the library along with Weld CDI and came up on the error:
Caused by: com.coxautodev.graphql.tools.SchemaClassScannerError: Unable to match type definition (ListType{type=TypeName{name='Ranking'}}) with java type (class [Lgameefy.graphql.Ranking;): Java class is not a List or generic type information was lost: class [Lgameefy.graphql.Ranking;
I tried creating a proxy similar to the Guice one without any luck.
public class WeldProxyHandler implements ProxyHandler
{
@Override
public boolean canHandle(GraphQLResolver<?> resolver) {
return isWeldProxy(resolver);
}
@Override
public Class<?> getTargetClass(GraphQLResolver<?> resolver) {
return resolver.getClass().getSuperclass();
}
private boolean isWeldProxy(GraphQLResolver<?> resolver) {
return resolver.getClass().getName().contains("$Proxy$_$$_WeldClientProxy");
}
}
I also put the newly WeldProxyHandler under proxy list on SchemaParserBuilder.
@DragontaleStudio Seeing you're mentioning a PR you made some changes in graphql-java-tools to make it work again for you? Then could you indeed share that PR?
Activity
DragontaleStudio commentedon Nov 21, 2018
Guys it is actually working. 👍
Yesterday during all the trials and errors I forgotten the actual method.
I was testing with:
public Ranking[] getAllRankings()Rolling it back to
List<Ranking>, made it work.I can create a pull request with relevant changes.
Thanks
oliemansm commentedon Nov 21, 2018
@DragontaleStudio Seeing you're mentioning a PR you made some changes in
graphql-java-toolsto make it work again for you? Then could you indeed share that PR?