Created
June 16, 2020 22:37
-
-
Save wb-softwares/a401130fd9bf10e8a21b94ecaf5572aa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Network.shared.apollo.fetch(query: ListPersonQuery) { result in | |
| switch result { | |
| case .success(let graphQLResult): | |
| if let items = graphQLResult.data?.listPerson?.items { | |
| for conf in items { | |
| if let curPerson = conf { | |
| //Do whatever here with your Graphql Result | |
| print(curPerson) | |
| } | |
| } | |
| } | |
| self.loading = false | |
| case .failure(let error): | |
| print("Failure! Error: \(error)") | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment