Skip to content

Commit ada2a1f

Browse files
authored
Spellchecking (#6057)
1 parent 3e55797 commit ada2a1f

27 files changed

+79
-53
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
!**/.idea/icon.png
88
!**/.idea/runConfigurations
99
!**/.idea/scopes
10+
!**/.idea/dictionaries
1011
*.iml
1112

1213
# Generated files

.idea/dictionaries/mbonnin.xml

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The Apollo team welcomes contributions of all kinds, including bug reports, docu
44
features.
55

66
If you want to discuss the project or just say hi, stop
7-
by [the kotlinlang slack channel](https://app.slack.com/client/T09229ZC6/C01A6KM1SBZ)(get your
7+
by [the kotlinlang Slack channel](https://app.slack.com/client/T09229ZC6/C01A6KM1SBZ)(get your
88
invite [here](https://slack.kotl.in/))
99

1010
## Project Setup
@@ -154,7 +154,7 @@ Misc
154154

155155
## Workflow
156156

157-
We love Github issues! Before working on any new features, please open an issue so that we can agree on the direction,
157+
We love GitHub issues! Before working on any new features, please open an issue so that we can agree on the direction,
158158
and hopefully avoid investing a lot of time on a feature that might need reworking.
159159

160160
Small pull requests for things like typos, bugfixes, etc are always welcome.

docs/source/advanced/authentication.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ If your user logged out, you might want to consider creating a new `ApolloClient
8989

9090
</Note>
9191

92-
Sometimes the websocket will emit an error that you can use in `webSocketReopenWhen` to create a new WebSocket. Other times that information will come from elsewhere in your app and you will have to force disconnect the WebSocket.
92+
Sometimes the websocket will emit an error that you can use in `webSocketReopenWhen` to create a new WebSocket. Other times that information will come from elsewhere in your app, and you have to force disconnect the WebSocket.
9393

9494
First define your own Exception:
9595

docs/source/advanced/client-awareness.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Client Awareness
33
---
44

5-
GraphOS Studio users can opt-in [Client Awareness](https://www.apollographql.com/docs/graphos/metrics/client-awareness/). Client Awareness allows you to view operation metrics split per client, helping you understand how each one interacts with your graph.
5+
GraphOS Studio users can opt in [Client Awareness](https://www.apollographql.com/docs/graphos/metrics/client-awareness/). Client Awareness allows you to view operation metrics split per client, helping you understand how each one interacts with your graph.
66

77
Client Awareness uses `apollographql-client-name` and `apollographql-client-version` custom HTTP headers to report client usage.
88

docs/source/advanced/experimental-websockets.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Starting with 4.0.0, Apollo Kotlin provides a new `com.apollographql.apollo.netw
2020
The `com.apollographql.apollo.network.websocket` implementation provides the following:
2121

2222
1. Defaults to the [graphql-ws](https://github.com/enisdenjo/graphql-ws/blob/master/PROTOCOL.md) protocol, which has become the de facto standard. Using the other protocols is still possible but having a main, specified, protocol ensures we can write a good and solid test suite.
23-
2. Does not inherit from the old memory model design, making the code considerably simpler. In particular, `WebSocketEngine` is now event based and no attempt at flow control is done. If you buffers grow too much, your subscription fails.
23+
2. Does not inherit from the old memory model design, making the code considerably simpler. In particular, `WebSocketEngine` is now event based and no attempt at flow control is done. If your buffers grow too much, your subscription fails.
2424
3. Plays nicely with the ApolloClient `retryOnError` API.
2525
4. Handles different Subscription transports more consistently.
2626

docs/source/advanced/http-engine.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ title: Using a custom HTTP client
44

55
By default, Apollo Kotlin uses the following HTTP clients for different platforms/languages:
66

7-
| Platform | HTTP Client |
8-
|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
9-
| Android/JVM | [OkHttp](https://square.github.io/okhttp/) |
7+
| Platform | HTTP Client |
8+
|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
9+
| Android/JVM | [OkHttp](https://square.github.io/okhttp/) |
1010
| JavaScript/Wasm | [fetch()](https://developer.mozilla.org/en-US/docs/Web/API/fetch) / [Node Fetch](https://www.npmjs.com/package/node-fetch) for HTTP, [Ktor](https://ktor.io/) for WebSockets |
11-
| iOS/MacOS | [NSURLSesssion](https://developer.apple.com/documentation/foundation/nsurlsession) |
11+
| iOS/MacOS | [NSURLSession](https://developer.apple.com/documentation/foundation/nsurlsession) |
1212

1313
## Implement your own HTTP engine
1414

docs/source/advanced/interceptors-http.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title: Interceptors
66

77
### Apollo HTTP interceptors
88

9-
Apollo Kotlin supports multi platform `HttpInterceptor` very similar to `OkHttp` `Interceptors`. Use them to add authentication headers, log the network calls or anything else.
9+
Apollo Kotlin supports multi-platform `HttpInterceptor` very similar to `OkHttp` `Interceptors`. Use them to add authentication headers, log the network calls or anything else.
1010

1111
The interface is a single method. For an example, implementing an authentication interceptors can be done with:
1212

@@ -31,7 +31,7 @@ Apollo Kotlin comes bundled with [`ClientAwarenessInterceptor`](./client-awarene
3131

3232
### OkHttp interceptors
3333

34-
If your project is an Android or JVM only project and you already have an [`OkHttp` `Interceptor`](https://square.github.io/okhttp/features/interceptors/), you can also reuse it:
34+
If your project is an Android or JVM only project, and you already have an [`OkHttp` `Interceptor`](https://square.github.io/okhttp/features/interceptors/), you can also reuse it:
3535

3636
```kotlin
3737
val okHttpClient = OkHttpClient.Builder()

docs/source/advanced/js-interop.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Kotlin down to Javascript. `apollo-runtime` supports Kotlin/JS out of the box wi
77

88
With that said, the default implementation has some performance limitations. Kotlin/JS adds a significant
99
amount of overhead to basic Kotlin data structures (notably `List`, `Set`, and `Map`), and so performance sensitive
10-
workloads (like those found in the Kotlin JSON parsing codepaths) can be slow.
10+
workloads (like those found in the Kotlin JSON parsing code paths) can be slow.
1111

1212
To work around this, Apollo Kotlin provides two alternative solutions to work with JS faster:
1313

@@ -170,7 +170,7 @@ public interface Animal {
170170
```
171171

172172
Unfortunately, `@JsExport` does not support companion objects nor extension functions (see [limitations](#limitations)).
173-
What's more, `@JsExport` has no runtime type information from JS so it's impossible to tell at runtime if a given
173+
What's more, `@JsExport` has no runtime type information from JS, so it's impossible to tell at runtime if a given
174174
instance is a `Cat` or a `Lion`. To check this, use `__typename` and `apolloUnsafeCast`:
175175

176176
```kotlin
@@ -191,23 +191,23 @@ when (animal.__typename) {
191191
* `@JsExport` is an experimental feature in Kotlin and Apollo Kotlin and may change in future versions.
192192
* `@JsExport` only makes sense on response based codegen since it requires the Kotlin models to have the same shape as
193193
the JSON.
194-
* On JS, is is not possible to check if a `@JsExport` instance implements a given class. If you need polymorphism, you
194+
* On JS, it is not possible to check if a `@JsExport` instance implements a given class. If you need polymorphism, you
195195
must check `__typename` to determine what interface to use.
196196
* Extension functions on generated code break when you use this technique since we are casting a raw JS object and not
197197
actually instantiating a class.
198198
* `generateAsInternal = true` does not work with `@JsExport`, since the compiler ends up giving the internal modifier
199199
precedence, and thus mangling the property names.
200200
* Custom adapters can only be used when their target types are supported by JS (see the full list
201201
of [supported types](https://kotlinlang.org/docs/js-to-kotlin-interop.html#kotlin-types-in-javascript)).
202-
* Enums do not support `@JsExport` and are generated as `String`. The Kotlin enum is still generated so you can
202+
* Enums do not support `@JsExport` and are generated as `String`. The Kotlin enum is still generated, so you can
203203
use `safeValueOf()` to get a Kotlin enum from a `String`
204204

205205
## `DynamicJsJsonReader`
206206

207-
If you would prefer to use `operationBased` models, and performance is not _as_ critical, you can
207+
If you prefer to use `operationBased` models, and performance is not _as_ critical, you can
208208
use `DynamicJsJsonReader`. `DynamicJsJsonReader` works with a JavaScript object that is already parsed on the JS side.
209209

210-
In JS reading response byte by byte from a byte array like Okio does incurs a lot of overhead because Kotlin
210+
In JS reading response byte by byte from a byte array like Okio incurs a lot of overhead because Kotlin
211211
uses `Long` indices in its Arrays, and Longs do not have a JS implementation.
212212

213213
By bypassing this reading, `DynamicJsJsonReader` allows faster reading of responses while still keeping the full Kotlin type information.
@@ -235,7 +235,7 @@ actual suspend fun <D : Operation.Data> JsonHttpClient.executeApolloOperation(
235235

236236
## Benchmarks
237237

238-
We have done some benchmarking using a large polymorphic query result from the Github API.
238+
We have done some benchmarking using a large polymorphic query result from the GitHub API.
239239

240240
The idea was to compare:
241241

docs/source/advanced/no-runtime.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Using the models without apollo-runtime
33
---
44

5-
`apollo-runtime` and `ApolloClient` provide support for doing the network requests and interacting with the cache but you can use the generated models and parsers without the runtime and use your network layer of choice for the HTTP calls.
5+
`apollo-runtime` and `ApolloClient` provide support for doing the network requests and interacting with the cache, but you can use the generated models and parsers without the runtime and use your network layer of choice for the HTTP calls.
66

77
For this, remove the `com.apollographql.apollo:apollo-runtime` dependency and replace it with:
88

@@ -46,6 +46,7 @@ To parse a network response into the type safe models, use `parseJsonResponse`:
4646
```kotlin
4747
/**
4848
* jsonResponse should contain a json with data and possibly errors:
49+
*
4950
* {
5051
* "data": ...
5152
* "errors": ...

0 commit comments

Comments
 (0)