Open ghost opened 7 years ago
Just realized that I can write:
queries {
field('history') {
type list(GraphQLHistory)
fetcher {env -> return DATA}
}
}
Thanks for the feedback. I've thought about this as well but I was expecting more feedback before changing anything. If I'm not wrong you were expecting something more similar to GraphQL schema definition, something like:
type GraphQLHistory // single type
type [GraphQLHistory] // list type
That is very feasible. It would mean that the related DSL supporting methods would be:
type(Class<GraphQLType> type) // single type
type(List<Class<GraphQLType>> listType) // list type
I will think about it in upcoming versions, but first I'm focusing on having a relay implementation which I think is more important. Then I will probably do a release with all received feedback like yours :)
Thanks again for the feedback, it's really important to improve the project.
Thanks four your answer. It's great that there is a nice GraphQL DSL for the JVM.
Instead of writing
I would like to write: