format Java Class to GraphQL Schema Type
import io.github.morningk.graphql.NonNull;
import io.github.morningk.graphql.ScalarType;
public class User {
private Long id;
public String name;
public int age;
@ScalarType("ID")
@NonNull
public Long getId() {
return this.id;
}
}
import io.github.morningk.graphql.tool.Formatter;
String result = Formatter.formatSchemaType(User.class);
type User {
name: String
age: Int
id: ID!
}