-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code generation from maven/gradle goals? #159
Comments
We don't offer build plugins at the moment. If this is the case, we're working on a client implementation so we need to tackle #10 first and then consider this issue. |
👍 to this issue: we want to move away from DGS framework to Spring for Graphql, and we are using some Gradle DGS plugins to generate the client model. |
This is not blocked anymore, so we need to discuss this as a team. |
Doesn't the code generation make sense also for server? Once I handwrite the graphql schema, it makes sense to me to generate at least DTOs for it. From: https://www.graphql-java.com/tutorials/getting-started-with-spring-boot/ type Book {
id: ID
name: String
pageCount: Int
author: Author
} and also public class Book {
private String id;
private String name;
private int pageCount;
private String authorId;
public Book(String id, String name, int pageCount, String authorId) {
this.id = id;
this.name = name;
this.pageCount = pageCount;
this.authorId = authorId;
}
public String getId() {
return id;
}
public String getAuthorId() {
return authorId;
}
} kind of duplicate? |
We've discussed this as a team today and we came to the following conclusion: while we think this is a valid use case, we don't feel like this is a top priority for the project now. On the client side, we're working on interface clients to avoid the need for code generation. On the server side, we think that tooling provided by DGS and other libraries should be usable with a Spring for GraphQL project. We might reconsider this feature for future releases, but for now we would like to focus on highly requested features like multipart, relay/pagination, observability, GraalVM native, nullability support, etc. If you're still interested in this feature, feel free to upvote the original description. Thanks! |
is it possible to generate java code (data model and Query, Mutation,... mappings) from the schema with a maven/gradle goal?
The text was updated successfully, but these errors were encountered: