I am trying to use DGS Codegen plugin in my spring boot GQL project,
Here is the build.gradle.kts file, where the respective dependencies mentioned
plugins {
java
id("org.springframework.boot") version "3.2.4"
id("io.spring.dependency-management") version "1.1.4"
id("com.netflix.dgs.codegen") version "6.1.5"
}
dependencyManagement {
imports {
mavenBom("com.netflix.graphql.dgs:graphql-dgs-platform-dependencies:latest.release")
}
}
The plugin generates the code as expected from the schema file, However I am still seeing the unresolved reference error for each 3 lines in the given script as below,
tasks.generateJava {
schemaPaths.add("${projectDir}/src/main/resources/schema") // List of directories containing schema files
packageName = "com.example.dgsdemo" // The package name to use to generate sources
generateClient = true // Enable generating the type safe query API
}
[Error screen shot] (https://i.stack.imgur.com/LCj73.png)
Do we need to check any other config settings, to make sure if the plugin is imported properly? Any suggestions to debug more?
Tried options:
- Upgraded to the latest package
- Invalidated cache and restarted intellij
- Tried to clean before the gradle build