diff --git a/spesialist-api/build.gradle.kts b/spesialist-api/build.gradle.kts index 0bf1ecce1..2405e812a 100644 --- a/spesialist-api/build.gradle.kts +++ b/spesialist-api/build.gradle.kts @@ -1,5 +1,3 @@ -import com.expediagroup.graphql.plugin.gradle.tasks.GraphQLGenerateClientTask - val testcontainersVersion = "1.19.0" val graphQLKotlinVersion = "6.5.3" val ktorVersion = "2.3.4" @@ -18,15 +16,12 @@ dependencies { testImplementation("io.ktor:ktor-server-netty:$ktorVersion") } -val graphqlGenerateClient by tasks.getting(GraphQLGenerateClientTask::class) { +graphql { val baseDir = "${project.projectDir}/src/main/resources/graphql" - - serializer.set(com.expediagroup.graphql.plugin.gradle.config.GraphQLSerializer.JACKSON) - packageName.set("no.nav.helse.spleis.graphql") - schemaFile.set(File("$baseDir/schema.graphql")) - queryFiles.from( - listOf( - File("$baseDir/hentSnapshot.graphql") - ) - ) + client { + schemaFile = file("$baseDir/schema.graphql") + queryFileDirectory = baseDir + packageName = "no.nav.helse.spleis.graphql" + serializer = com.expediagroup.graphql.plugin.gradle.config.GraphQLSerializer.JACKSON + } }