Replies: 1 comment 7 replies
-
Thanks for the interest in the library. |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I am using the
graphql-java-codegen
plugin for generating Kotlin classes from a GraphQL schema. I am looking for a way to modify the toString method in the generated classes to include custom logging.data class Book(val id: String, val title: String) {
override fun toString(): String {
val stringRepresentation = "Book(id=$id, title=$title)"
// logging
log.info("Book toString called: $stringRepresentation")
return stringRepresentation
}
}
Is there a way that allows this level of customization in the generated Kotlin classes via custom templates or some other configuration option? Or would you recommend an alternative approach to customize the behavior of methods in the generated classes?
Any guidance or suggestions on this would be greatly appreciated.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions