Skip to content

Commit

Permalink
docs: add initialization to query in snippet (#2976)
Browse files Browse the repository at this point in the history
  • Loading branch information
CemYil03 committed Apr 24, 2023
1 parent dab1c32 commit 6b3e7cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/source/get-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ query HeroName {
Apollo iOS will generate a `HeroNameQuery` class that you can construct and pass to `ApolloClient.fetch(query:)`:

```swift
apolloClient.fetch(query: HeroNameQuery) { result in
apolloClient.fetch(query: HeroNameQuery()) { result in
guard let data = try? result.get().data else { return }
print(data.hero.name) // Luke Skywalker
}
```

> See [Fetching data](./fetching/fetching-data) for more details.
> See [Fetching data](./fetching/fetching-data) for more details.

0 comments on commit 6b3e7cb

Please sign in to comment.