Skip to content

Commit 6781aaf

Browse files
use same names in step-by-step instructions as in final for schema download and codegen options
1 parent 3df7800 commit 6781aaf

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

docs/source/swift-scripting.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,8 @@ One of the convenience wrappers available to you in the target is `ApolloSchemaD
224224
3. Set up your `ApolloSchemaOptions` object. In this case, we'll use the [default arguments for all the constructor parameters that take them](./api/ApolloCodegenLib/structs/ApolloSchemaOptions#methods), and only pass in the endpoint to download from and the folder to put the downloaded file into:
225225

226226
```swift:title=main.swift
227-
let options = ApolloSchemaOptions(endpointURL: endpoint,
228-
outputFolderURL: output)
227+
let schemaDownloadOptions = ApolloSchemaOptions(endpointURL: endpoint,
228+
outputFolderURL: output)
229229
```
230230

231231
With these defaults, this will download a JSON file called `schema.json`.
@@ -235,7 +235,7 @@ One of the convenience wrappers available to you in the target is `ApolloSchemaD
235235
```swift:title=main.swift
236236
do {
237237
try ApolloSchemaDownloader.run(with: cliFolderURL,
238-
options: options)
238+
options: schemaDownloadOptions)
239239
} catch {
240240
exit(1)
241241
}
@@ -319,7 +319,7 @@ Here, for example, is what this looks like in a file for one of the queries in o
319319
2. Set up your `ApolloCodegenOptions` object. In this case, we'll use the constructor that [sets defaults for you automatically](./api/ApolloCodegenLib/structs/ApolloCodegenOptions#methods):
320320

321321
```swift:title=main.swift
322-
let options = ApolloCodegenOptions(targetRootURL: targetURL)
322+
let codegenOptions = ApolloCodegenOptions(targetRootURL: targetURL)
323323
```
324324

325325
This creates a single file called `API.swift` in the target's root folder.
@@ -330,7 +330,7 @@ Here, for example, is what this looks like in a file for one of the queries in o
330330
do {
331331
try ApolloCodegen.run(from: targetURL,
332332
with: cliFolderURL,
333-
options: options)
333+
options: codegenOptions)
334334
} catch {
335335
exit(1)
336336
}

0 commit comments

Comments
 (0)