Skip to content

Latest commit

 

History

History
22 lines (18 loc) · 839 Bytes

gettings-started.md

File metadata and controls

22 lines (18 loc) · 839 Bytes

Getting started (Gradle Plugin)

The code generation can easily be used with the provided Gradle plugin. The plugin will automatically hook into your build task and generate the code before it. It also creates the required sourceset for the generated code by itself.

Plugin setup

plugins {
  // Apply the plugin with the latest version.
    id("com.auritylab.graphql-kotlin-toolkit.codegen") version "0.5.0"
}

// Configure the code generation.
graphqlKotlinCodegen {
    // Define your schemas.
    schemas.from(fileTree("src/main/resources/graphql").matching { include("*.graphqls") })
}

After you've configured the plugin you may continue with configuring your schema.

Further configuration options for the plugin can be found here.