ermadmi78 / kobby

Kobby is a codegen plugin of Kotlin DSL Client by GraphQL schema. The generated DSL supports execution of complex GraphQL queries, mutation and subscriptions in Kotlin with syntax similar to native GraphQL syntax.
Apache License 2.0
83 stars 4 forks source link

Switch on dynamic HTTP headers in Ktor adapters by default #30

Closed ermadmi78 closed 2 years ago

ermadmi78 commented 2 years ago

In #26 issue it became possible to switch on dynamic HTTP headers in Ktor adapters. But by default this feature is disabled. It would be great to enable dynamic HTTP headers by default in Kobby 2.0 release.

Attention! It is breaking change!!! To return to previous settings, use:

Gradle:

plugins {
    kotlin("jvm")
    id("io.github.ermadmi78.kobby")
}

kobby {
    kotlin {
        adapter {
            ktor {
                dynamicHttpHeaders = false
            }
        }
    }
}

Maven:

<build>
    <plugins>
        <plugin>
            <groupId>io.github.ermadmi78</groupId>
            <artifactId>kobby-maven-plugin</artifactId>
            <version>1.6.0</version>
            <executions>
                <execution>
                    <phase>generate-sources</phase>
                    <goals>
                        <goal>generate-kotlin</goal>
                    </goals>
                    <configuration>
                        <kotlin>
                            <adapter>
                                <ktor>
                                    <dynamicHttpHeaders>false</dynamicHttpHeaders>
                                </ktor>
                            </adapter>
                        </kotlin>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>
ermadmi78 commented 2 years ago

Available since release 2.0.0-beta.01