createAllKotlinSourceSetServices

abstract fun createAllKotlinSourceSetServices(    sourceFolder: String,     nameSuffix: String,     action: Action<Service>)

registers multiple services for a Kotlin project

This will create a GraphQL service for each source set and add the sources to the KotlinCompile task.

Unlike Android variants, each KotlinCompile task will have a single source set so you can put your files in

  • src/$sourceSetName/graphql/$sourceFolder/Query.graphql

Parameters

sourceFolder

: where to look for "*.graphql" files, relative to "src/$sourceSetName/graphql". You can pass "." to look into "src/$sourceSetName/graphql"

nameSuffix

: the suffix to use to name the services. A service will be created per source set named "${sourceSet.name}{nameSuffix.capitalize()}". For an example, if nameSuffix = starwars, the below services will be created:

  • mainStarwars

  • testStarwars

If your project has more Kotlin source sets, services will be created for those as well

action

: an action to configure the packageName and other parameters on each service. Will be called once for each sourceSet