apollographql / apollo-kotlin

:rocket:  A strongly-typed, caching GraphQL client for the JVM, Android, and Kotlin multiplatform.
https://www.apollographql.com/docs/kotlin
MIT License
3.73k stars 653 forks source link

Allow http GET method for introspection query #5390

Open ecgreb opened 9 months ago

ecgreb commented 9 months ago

Use case

Hi Apollo team, thanks for all the great work on this project! Are there plans to support http GET method for introspection queries? Some CMS platforms (ex. Prismic) require GET to be used for all queries including introspection.

Describe the solution you'd like

Allow setting of http method via introspection block in gradle config.

build.gradle.kts

apollo {
    service("prismic") {
        packageName.set("com.example.android")
        introspection {
            endpointUrl.set("https://example.prismic.io/graphql")
            schemaFile.set(file("src/main/graphql/schema.graphqls"))
            httpMethod.set("GET") // Proposed solution
        }
    }
}
martinbonnin commented 9 months ago

This must be quite the GET url. Introspection are not particularly "short" 😄 . But adding a httpMethod param sounds good to me.

Do you want to open a PR?