graphql-maven-plugin is a Maven Plugin for GraphQL, based on graphql-java. It accelerates the development for both the client and the server, by generating the Java code. It allows a quicker development when in contract-first approach, by avoiding to code the boilerplate code.
With the following schema definition defined using graphql syntax:
type query_root {
"""
fetch data from the table: "maps.acq"
"""
mapsAcq(
"""distinct select on columns"""
distinctOn: [MapsAcqrSelectColumn!]
"""limit the number of rows returned"""
limit: Int
"""skip the first n rows. Use only with order_by"""
offset: Int
"""sort the rows by one or more columns"""
orderBy: [MapsAcqOrderBy!]
"""filter the rows returned"""
where: MapsAcqBoolExp
): [MapsAcq!]!
}
In the generated classes the comments could be included to describe the different fields correctly instead of using "Parameter for the mapsAcqr field of query_root, as defined in the GraphQL schema" description string.
Update of all call to setComments in DocumentParser to load Descriptions instead of comments. Allow descriptions to be acessible in template files. Add desciptions to InputParameters if exist to be acessible to templaters.
With the following schema definition defined using graphql syntax:
In the generated classes the comments could be included to describe the different fields correctly instead of using "Parameter for the mapsAcqr field of query_root, as defined in the GraphQL schema" description string.
All comments are loaded in Description field and no longer in comment (graphql.language.Comment) fields when using java schema parser (https://github.com/graphql/graphql-js/pull/927 and https://github.com/graphql/graphql-spec/issues/420).
Update of all call to setComments in DocumentParser to load Descriptions instead of comments. Allow descriptions to be acessible in template files. Add desciptions to InputParameters if exist to be acessible to templaters.