Skip to content

Commit fa77e9c

Browse files
committed
Add imports to example code
1 parent 20efbb2 commit fa77e9c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,18 @@ Add `*.graphql.swift` to your repository's git ignore file to ignore Apollo gene
9898

9999
### Defining Query or Mutation
100100
```swift
101+
import GraphQLAPI
102+
import GraphQLAPIKit
103+
101104
let query = MyExampleQuery()
102105
let mutation = MyExampleMutation()
103106
```
104107

105108
### Fetching the query/perform mutation
106109
```swift
110+
import GraphQLAPI
111+
import GraphQLAPIKit
112+
107113
let apiAdapter = GraphQLAPIAdapter(url: URL(string: "https://MyAPIUrl.com")!)
108114
let queryResult = await apiAdapter.fetch(query: query)
109115
let mutationResult = await apiAdapter.perform(mutation: mutation)

0 commit comments

Comments
 (0)