Skip to content

Commit 306dad7

Browse files
authored
[Doc] A few minor updates (#6098)
* Tutorial: add a note about downloading the schema from the IDE plugin * ApolloStore: add a note about read/write operations being synchronous * Add a Java hint in the Getting Started section * Fix <Note> missing new lines * Rename index.md to index.mdx so <Tip> works
1 parent 555f8b3 commit 306dad7

File tree

5 files changed

+18
-1
lines changed

5 files changed

+18
-1
lines changed

docs/source/advanced/client-awareness.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@ val apolloClient = ApolloClient.Builder()
1616
```
1717

1818
<Note>
19+
1920
This example uses `BuildConfig` to set the app's `applicationId` as the client name and its `versionName` as the client version, but you can override this. Especially, if your iOS and Android apps use the same package name, it's useful to customize it to be able to differentiate the clients.
21+
2022
</Note>

docs/source/advanced/nullability.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,9 @@ class User(
247247
```
248248

249249
<Note>
250+
250251
The error is thrown during parsing but still caught before it reaches your UI code. If no parent field catches it, the Apollo Kotlin runtime will and set it as `ApolloResponse.exception`.
252+
251253
</Note>
252254

253255
### Coerce errors to null
@@ -276,7 +278,9 @@ class User(
276278
```
277279

278280
<Note>
281+
279282
The error is thrown during parsing but still caught before it reaches your UI code. If no parent field catches it, the Apollo Kotlin runtime does and exposes the exception in `ApolloResponse.exception`.
283+
280284
</Note>
281285

282286
## `@catchByDefault`
@@ -317,4 +321,4 @@ In order to change that default to "opt-in the errors you want to handle", you c
317321
1. Add `@catch` to individual fields, get more comfortable with how it works.
318322
1. When ready to do the big switch, change to `extend schema catch(to: THROW)` and (at the same time) add `query GetFoo @catch(to: NULL) {}` on all operations/fragments (this is a no-op).
319323
1. From this moment on, new queries written are `catch(to: THROW)` by default.
320-
1. Remove `query GetFoo @catch(to: NULL) {}` progressively.
324+
1. Remove `query GetFoo @catch(to: NULL) {}` progressively.

docs/source/caching/store.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ val apolloClient = ApolloClient.Builder()
1515
val apolloStore: ApolloStore = apolloClient.apolloStore
1616
```
1717

18+
Note that the read and write operations are synchronous and might block if the underlying cache is doing IO (such as the [SQLite cache](../caching/normalized-cache#sqlite-cache)).
19+
Therefore calling them from the main thread should be avoided.
20+
1821
## Reading operation data
1922

2023
Just like a regular GraphQL query, the main way to use the store is to read and write queries:

docs/source/index.md renamed to docs/source/index.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ apollo {
6161
}
6262
```
6363

64+
<Tip>
65+
66+
Using Java? Apollo Kotlin has a dedicated [Java Support](https://apollographql.github.io/apollo-kotlin-java-support/) repository.
67+
68+
</Tip>
69+
6470
Apollo Kotlin supports three types of files:
6571
- `.graphqls` schema files: describes the types in your backend using the GraphQL syntax.
6672
- `.json` schema files: describes the types in your backend using the Json syntax.

docs/source/tutorial/02-add-the-graphql-schema.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,6 @@ Then, from the root of the project, run this command in Android Studio's Termina
4646

4747
This will download a `schema.graphqls` file from your endpoint to `app/src/main/graphql/schema.graphqls`.
4848

49+
If you installed the [Android Studio Plugin](https://www.apollographql.com/docs/kotlin/testing/android-studio-plugin/), you can also download the schema from <kbd>Tools</kbd> | <kbd>Apollo</kbd> | <kbd>Download Schema</kbd>.
50+
4951
Next, [write your first query](03-write-your-first-query) that uses this schema.

0 commit comments

Comments
 (0)