Netflix / dgs-codegen

Apache License 2.0
177 stars 92 forks source link

Is the official document of generating codes outdated? or some classes are not auto-generated? #660

Closed dingyo777 closed 4 months ago

dingyo777 commented 4 months ago

I'm watching this document.

And I've developed with kotlin project.

I'm generating codes using com.netflix.dgs.codegen plugin in gradle with 5.12.4.

And my code gen config is as follows:

generateClient = true
generateDataTypes = true
generateKotlinNullableClasses = true
generateKotlinClosureProjections = true

My question is when I generate kotlin codes from my schema, there are many projection classes ~~~Projection for each type but has no classes named like ~~~ProjectionRoot.

But when I read the document, some example mentions MoviesProjectionRoot class. Is the class auto-generated one? If yes, then why my auto-generated codes has not that kind of class??

srinivasankavitha commented 4 months ago

You are using a different API specifically for Kotlin client codegen. The docs are here: https://netflix.github.io/dgs/advanced/kotlin-codegen/