Hi,
I'm using the following code to generate GraphQL query. The nested field in response type has Generic type (Java Generics). Due to this schema is not generated automatically and getting exception graphql.AssertException: type Object not found in schema
during startup.
I'm Using (Open Liberty 23.0.0.10)
Here is my Example Code:
public interface GenericType<T> {
T getValue();
}
public class ResponseName implements GenericType<String> {
String value;
public ResponseName(String value) {
this.value = value;
}
public void setValue(String value) {
this.value = value;
}
@Override
public String getValue() {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'getValue'");
}
}
public class Response {
ResponseName value;
public String getValue() {
throw new UnsupportedOperationException("Unimplemented method 'getName'");
}
public void setValue(ResponseName value) {
this.value = value;
}
}
@Query
public Response getAllLocationsTest(@Name("location") String location) throws UnknownLocationException {
Response rs = new Response();
rs.setValue(new ResponseName(location));
return rs;
}
Hi, I'm using the following code to generate GraphQL query. The nested field in response type has Generic type (Java Generics). Due to this schema is not generated automatically and getting exception
graphql.AssertException: type Object not found in schema
during startup.I'm Using (Open Liberty 23.0.0.10)
Here is my Example Code:
Exception:
Could you assist to me resolve the issue?