Skip to content

Latest commit

 

History

History
36 lines (31 loc) · 1.01 KB

File metadata and controls

36 lines (31 loc) · 1.01 KB

Getting started

The Spring Boot starter configures most parts by it self. You just have to configure your GraphQL schemas.

Dependency

Gradle

dependencies {
    implementation("com.auritylab.graphql-kotlin-toolkit:spring-boot-starter:0.5.0")
}

Maven

<dependency>
    <groupId>com.auritylab.graphql-kotlin-toolkit</groupId>
    <artifactId>spring-boot-starter</artifactId>
    <version>0.5.0</version>
</dependency>

Schemas

After adding the dependencies you need to tell the integration where to search for your schemas. All you have to do is to add a Bean of type GQLSchemaSupplier.

Using schema files which are located in your resources folder:

@Configuration
class GraphQLConfiguration {
    @Bean
    fun schemaSupplier() = GQLSchemaSupplier.ofResourceFiles(
        "graphql/schema.graphqls"
        // Other schema files
    )
}