Skip to content

Commit 396b1e2

Browse files
authored
Update 3.x migration guide for persisted queries (#6448)
1 parent 51653c8 commit 396b1e2

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

docs/source/migration/3.0.mdx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,25 @@ If you feel some API is missing from `SubscriptionManager`,
819819
please [reach out](https://github.com/apollographql/apollo-kotlin/issues/new?assignees=&labels=%3Asparkles%3A+Type%3A+Feature&template=feature_request.md&title=)
820820
so we can discuss the best way to add them.
821821

822+
### Persisted queries
823+
824+
Apollo Kotlin 3 has changed the name of the function to enable persisted queries and now defaults to use HTTP GET:
825+
826+
```kotlin
827+
// Replace
828+
return ApolloClient.Builder()
829+
.serverUrl(serverUrl)
830+
.enableAutoPersistedQueries(true)
831+
.useHttpGetMethodForPersistedQueries(true)
832+
.build()
833+
834+
// With
835+
return ApolloClient.Builder()
836+
.serverUrl(serverUrl)
837+
.autoPersistedQueries(httpMethodForHashedQueries = HttpMethod.Get)
838+
.build()
839+
```
840+
822841
### Downloading schemas
823842

824843
Because it is not possible to determine the Gradle current working directory reliably, the `downloadApolloSchema` task now uses paths relative to the root project directory:

0 commit comments

Comments
 (0)