I am having following enum in the application.
public enum State {
Started("newly started"),
Hold("hold on"),
Running("still running"),
Stop("just stopped");
private String value;
State(String value) {
this.value = value;
}
public String getValue() {
return value;
}
}
I have GraphQL schema as well for the same. I am using GraphQL-java library not GraphQL-spqr or GraphQL-java-tools. When I am returning this enum, it's name is being returned but I want to return it's assigned value i.e. "still running" for Running enum, "just stopped" for Stop enum etc. Is there any way in GraphQL-java?
Thanks in advance