How can I refer a local file schema instead of introspection and SDL endpoint usage when using the gradle plugin? #905
-
|
The documentation says:
I wonder what I need to do in the gradle plugin to allow the configuration I receive the following error But without omitting |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Instead you will need to configure the corresponding task directly, e.g. val graphqlGenerateClient by tasks.getting(GraphQLGenerateClientTask::class) {
packageName.set("com.example.generated")
schemaFile.set(file("path/to/your/schema/file")
}You can then invoke the corresponding task directly (it will also automatically add itself as a dependency of |
Beta Was this translation helpful? Give feedback.
graphqlextension will apply introspection/sdl task to obtain the schema and use the resulting schema as an input to generate the client. It is not possible to use the extension to run just client generation. See documentation.Instead you will need to configure the corresponding task directly, e.g.
You can then invoke the corresponding task directly (it will also automatically add itself as a dependency of
compileKotlintask)