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
log.txt
GraphQLObjectMapper is throwing exception in the typeArguments stack. It follows attached the log.
at java.util.Stack.peek(Unknown Source) ~[na:1.8.0_121]
at com.bretpatterson.schemagen.graphql.impl.GraphQLObjectMapper.getClassFromType(GraphQLObjectMapper.java:742) ~[schemagen-graphql-1.0.2.jar:na]
Basically I have the following classes:
public abstract class BaseEntity<ID> implements IdentifiedObject<ID>, VersionedEntity {
@Id
private ID id;
public ID getId() {
return id;
}
public void setId(ID id) {
this.id=id;
}
}
public class Person extends BaseEntity<Long> implements IdentifiedObject<Long> {
// Person details
}
It fails in the build:
@GraphQLController
public class KeyValueStoreController {
@GraphQLIgnore
private Map<String,Person> dataStore = new HashMap<String,Person>();
public KeyValueStoreController() {
Person c = new Person();
c.setFirstName("Alisson");
c.setLastName("Godoi");
c.setId(1L);
dataStore.put("1", c);
}
@GraphQLQuery(name="get")
public Person getValue(@GraphQLParam(name="key") String key) {
return dataStore.get(key);
}
@GraphQLMutation(name="put")
public Customer setValue(String key, Customer value) {
dataStore.put(key,value);
return value;
}
}
KeyValueStoreController key = new KeyValueStoreController();
ObjectMapper objectMapper = new ObjectMapper();
GraphQLSchema schema = GraphQLSchemaBuilder.newBuilder()
.registerTypeFactory(new JacksonTypeFactory(objectMapper))
.registerGraphQLControllerObjects(ImmutableList.<Object>of(key))
.build();
typeArguments variable is empty. It is trying to fetch variable type ID for the method BaseEntity.getId() getClassFromType(typeArguments.peek().get(((TypeVariable<?>) type).getName()));
The text was updated successfully, but these errors were encountered:
log.txt
GraphQLObjectMapper is throwing exception in the typeArguments stack. It follows attached the log.
Basically I have the following classes:
It fails in the build:
typeArguments variable is empty. It is trying to fetch variable type ID for the method BaseEntity.getId()
getClassFromType(typeArguments.peek().get(((TypeVariable<?>) type).getName()));
The text was updated successfully, but these errors were encountered: