├── .gitignore ├── Codegen ├── .gitignore ├── Package.resolved ├── Package.swift ├── README.md ├── Sources │ └── Codegen │ │ └── main.swift └── Tests │ ├── CodegenTests │ ├── CodegenTests.swift │ └── XCTestManifests.swift │ └── LinuxMain.swift ├── GraphQLSwiftUI.xcodeproj └── project.pbxproj ├── GraphQLSwiftUI ├── AppDelegate.swift ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json ├── Base.lproj │ └── LaunchScreen.storyboard ├── Controllers │ ├── LocationController.swift │ └── Networking │ │ ├── ApolloController.swift │ │ └── ApolloRequestCoordinator.swift ├── Extensions │ ├── BusinessFragment_Extensions.swift │ └── Double_Extensions.swift ├── GraphQL │ ├── API.swift │ ├── Businesses.graphql │ ├── operationIDs.json │ └── schema.json ├── Info.plist ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json ├── SceneDelegate.swift └── Views │ ├── BusinessFragmentView.swift │ ├── ContentView.swift │ ├── HeaderView.swift │ ├── LocationView.swift │ └── SearchBar.swift ├── Images ├── Header.png └── Screenshots.png └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .DS_Store 3 | 4 | build/* 5 | *.pbxuser 6 | !default.pbxuser 7 | *.mode1v3 8 | !default.mode1v3 9 | *.mode2v3 10 | !default.mode2v3 11 | *.perspectivev3 12 | !default.perspectivev3 13 | *.xcworkspace 14 | !default.xcworkspace 15 | xcuserdata 16 | *.moved-aside 17 | .bundle 18 | Development.xcconfig 19 | 20 | Carthage/* 21 | Pods/* 22 | Codegen/ApolloCLI/* 23 | -------------------------------------------------------------------------------- /Codegen/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /.build 3 | /Packages 4 | /*.xcodeproj 5 | xcuserdata/ 6 | -------------------------------------------------------------------------------- /Codegen/Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "object": { 3 | "pins": [ 4 | { 5 | "package": "Apollo", 6 | "repositoryURL": "https://github.com/apollographql/apollo-ios.git", 7 | "state": { 8 | "branch": null, 9 | "revision": "44c6ae2313b7b9c2515a62492ff30f495e7fc98f", 10 | "version": "0.25.0" 11 | } 12 | }, 13 | { 14 | "package": "PathKit", 15 | "repositoryURL": "https://github.com/kylef/PathKit.git", 16 | "state": { 17 | "branch": null, 18 | "revision": "e2f5be30e4c8f531c9c1e8765aa7b71c0a45d7a0", 19 | "version": "0.9.2" 20 | } 21 | }, 22 | { 23 | "package": "Spectre", 24 | "repositoryURL": "https://github.com/kylef/Spectre.git", 25 | "state": { 26 | "branch": null, 27 | "revision": "f14ff47f45642aa5703900980b014c2e9394b6e5", 28 | "version": "0.9.0" 29 | } 30 | }, 31 | { 32 | "package": "SQLite.swift", 33 | "repositoryURL": "https://github.com/stephencelis/SQLite.swift.git", 34 | "state": { 35 | "branch": null, 36 | "revision": "0a9893ec030501a3956bee572d6b4fdd3ae158a1", 37 | "version": "0.12.2" 38 | } 39 | }, 40 | { 41 | "package": "Starscream", 42 | "repositoryURL": "https://github.com/daltoniam/Starscream", 43 | "state": { 44 | "branch": null, 45 | "revision": "e6b65c6d9077ea48b4a7bdda8994a1d3c6969c8d", 46 | "version": "3.1.1" 47 | } 48 | }, 49 | { 50 | "package": "Stencil", 51 | "repositoryURL": "https://github.com/stencilproject/Stencil.git", 52 | "state": { 53 | "branch": null, 54 | "revision": "0e9a78d6584e3812cd9c09494d5c7b483e8f533c", 55 | "version": "0.13.1" 56 | } 57 | }, 58 | { 59 | "package": "swift-nio-zlib-support", 60 | "repositoryURL": "https://github.com/apple/swift-nio-zlib-support.git", 61 | "state": { 62 | "branch": null, 63 | "revision": "37760e9a52030bb9011972c5213c3350fa9d41fd", 64 | "version": "1.0.0" 65 | } 66 | } 67 | ] 68 | }, 69 | "version": 1 70 | } 71 | -------------------------------------------------------------------------------- /Codegen/Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.2 2 | // The swift-tools-version declares the minimum version of Swift required to build this package. 3 | 4 | import PackageDescription 5 | 6 | let package = Package( 7 | name: "Codegen", 8 | dependencies: [ 9 | // Dependencies declare other packages that this package depends on. 10 | .package(name: "Apollo", url: "https://github.com/apollographql/apollo-ios.git", .upToNextMinor(from: "0.25.0")) 11 | ], 12 | targets: [ 13 | // Targets are the basic building blocks of a package. A target can define a module or a test suite. 14 | // Targets can depend on other targets in this package, and on products in packages which this package depends on. 15 | .target( 16 | name: "Codegen", 17 | dependencies: [ 18 | .product(name: "ApolloCodegenLib", package: "Apollo"), 19 | ]), 20 | .testTarget( 21 | name: "CodegenTests", 22 | dependencies: ["Codegen"]), 23 | ] 24 | ) 25 | -------------------------------------------------------------------------------- /Codegen/README.md: -------------------------------------------------------------------------------- 1 | # Codegen 2 | 3 | A description of this package. 4 | -------------------------------------------------------------------------------- /Codegen/Sources/Codegen/main.swift: -------------------------------------------------------------------------------- 1 | import ApolloCodegenLib 2 | import FileProvider 3 | 4 | let parentFolderOfScriptFile = FileFinder.findParentFolder() 5 | //1) Get some directory references 6 | //This is the directory that the entire project lives in. 7 | let projectDirectory = parentFolderOfScriptFile.deletingLastPathComponent().deletingLastPathComponent().deletingLastPathComponent() 8 | 9 | //This is the directory for the Codegen 10 | let codegenDirectory = projectDirectory.appendingPathComponent("Codegen") 11 | 12 | //This will tack on a directory in the Codegen folder called "ApolloCLI". This is where the Apollo Node tools get downloaded and stored. I have told my .gitignore file to ignore this folder. 13 | let cliFolderURL = codegenDirectory.appendingPathComponent("ApolloCLI") 14 | 15 | //This is the folder in my Xcode project that I want the schema.json file to be downloaded and the API.swift file to be generated. All my .graphql files are here. 16 | let graphQLFolder = projectDirectory.appendingPathComponent("GraphQLSwiftUI").appendingPathComponent("GraphQL") 17 | 18 | //2) Make the objects to hold the Yelp API information 19 | let yelpGraphQLURL = URL(string: "https://api.yelp.com/v3/graphql")! 20 | 21 | let yelpAPIKey: String = "qco6Jeyqwo8-v8QRaCxWSiO5Fwr7JhWOSObUthK4ajdFVGuTvPHNjmi_b9A_UaOAmJzo2Vt6GlEmyxJwIOs2yWXr3FcPK0x3QBA-YpLFPq-w_UnIl9Q4bb0_SumwXHYx" 22 | 23 | //3) Make the ApolloSchemaOptions that will help accomplish our two tasks. 24 | let schemaDownloadOptions: ApolloSchemaOptions = ApolloSchemaOptions.init(endpointURL: yelpGraphQLURL, header: "Authorization: Bearer \(yelpAPIKey)", outputFolderURL: graphQLFolder) 25 | 26 | let codeGenerationOption: ApolloCodegenOptions = ApolloCodegenOptions.init(targetRootURL: graphQLFolder) 27 | 28 | do { 29 | 30 | //3) Perform our two tasks. 31 | //Do the schema download 32 | try ApolloSchemaDownloader.run(with: cliFolderURL, options: schemaDownloadOptions) 33 | //Do the code generation 34 | try ApolloCodegen.run(from: graphQLFolder, with: cliFolderURL, options: codeGenerationOption) 35 | 36 | }catch{ 37 | print(error) 38 | exit(1) 39 | } 40 | -------------------------------------------------------------------------------- /Codegen/Tests/CodegenTests/CodegenTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import class Foundation.Bundle 3 | 4 | final class CodegenTests: XCTestCase { 5 | func testExample() throws { 6 | // This is an example of a functional test case. 7 | // Use XCTAssert and related functions to verify your tests produce the correct 8 | // results. 9 | 10 | // Some of the APIs that we use below are available in macOS 10.13 and above. 11 | guard #available(macOS 10.13, *) else { 12 | return 13 | } 14 | 15 | let fooBinary = productsDirectory.appendingPathComponent("Codegen") 16 | 17 | let process = Process() 18 | process.executableURL = fooBinary 19 | 20 | let pipe = Pipe() 21 | process.standardOutput = pipe 22 | 23 | try process.run() 24 | process.waitUntilExit() 25 | 26 | let data = pipe.fileHandleForReading.readDataToEndOfFile() 27 | let output = String(data: data, encoding: .utf8) 28 | 29 | XCTAssertEqual(output, "Hello, world!\n") 30 | } 31 | 32 | /// Returns path to the built products directory. 33 | var productsDirectory: URL { 34 | #if os(macOS) 35 | for bundle in Bundle.allBundles where bundle.bundlePath.hasSuffix(".xctest") { 36 | return bundle.bundleURL.deletingLastPathComponent() 37 | } 38 | fatalError("couldn't find the products directory") 39 | #else 40 | return Bundle.main.bundleURL 41 | #endif 42 | } 43 | 44 | static var allTests = [ 45 | ("testExample", testExample), 46 | ] 47 | } 48 | -------------------------------------------------------------------------------- /Codegen/Tests/CodegenTests/XCTestManifests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | #if !canImport(ObjectiveC) 4 | public func allTests() -> [XCTestCaseEntry] { 5 | return [ 6 | testCase(CodegenTests.allTests), 7 | ] 8 | } 9 | #endif 10 | -------------------------------------------------------------------------------- /Codegen/Tests/LinuxMain.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | import CodegenTests 4 | 5 | var tests = [XCTestCaseEntry]() 6 | tests += CodegenTests.allTests() 7 | XCTMain(tests) 8 | -------------------------------------------------------------------------------- /GraphQLSwiftUI.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 52; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 761DE06A244E5B5B009D33E5 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761DE069244E5B5B009D33E5 /* AppDelegate.swift */; }; 11 | 761DE06C244E5B5B009D33E5 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761DE06B244E5B5B009D33E5 /* SceneDelegate.swift */; }; 12 | 761DE06E244E5B5B009D33E5 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761DE06D244E5B5B009D33E5 /* ContentView.swift */; }; 13 | 761DE070244E5B5C009D33E5 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 761DE06F244E5B5C009D33E5 /* Assets.xcassets */; }; 14 | 761DE073244E5B5C009D33E5 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 761DE072244E5B5C009D33E5 /* Preview Assets.xcassets */; }; 15 | 761DE076244E5B5C009D33E5 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 761DE074244E5B5C009D33E5 /* LaunchScreen.storyboard */; }; 16 | 761DE07F244E5B8C009D33E5 /* Businesses.graphql in Resources */ = {isa = PBXBuildFile; fileRef = 761DE07E244E5B8C009D33E5 /* Businesses.graphql */; }; 17 | 761DE081244E5D51009D33E5 /* API.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761DE080244E5D51009D33E5 /* API.swift */; }; 18 | 761DE085244E5FE4009D33E5 /* ApolloSQLite in Frameworks */ = {isa = PBXBuildFile; productRef = 761DE084244E5FE4009D33E5 /* ApolloSQLite */; }; 19 | 761DE087244E5FE4009D33E5 /* ApolloWebSocket in Frameworks */ = {isa = PBXBuildFile; productRef = 761DE086244E5FE4009D33E5 /* ApolloWebSocket */; }; 20 | 761DE089244E5FE4009D33E5 /* Apollo in Frameworks */ = {isa = PBXBuildFile; productRef = 761DE088244E5FE4009D33E5 /* Apollo */; }; 21 | 761DE08B244E5FE4009D33E5 /* ApolloCodegenLib in Frameworks */ = {isa = PBXBuildFile; productRef = 761DE08A244E5FE4009D33E5 /* ApolloCodegenLib */; }; 22 | 761DE08F244E61AF009D33E5 /* ApolloRequestCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761DE08E244E61AF009D33E5 /* ApolloRequestCoordinator.swift */; }; 23 | 761DE094244E73E1009D33E5 /* ApolloController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761DE093244E73E1009D33E5 /* ApolloController.swift */; }; 24 | 761DE097244EAD25009D33E5 /* BusinessFragment_Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761DE096244EAD25009D33E5 /* BusinessFragment_Extensions.swift */; }; 25 | 761DE09D244F5273009D33E5 /* LocationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761DE09C244F5273009D33E5 /* LocationController.swift */; }; 26 | 761DE09F2450159E009D33E5 /* LocationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761DE09E2450159E009D33E5 /* LocationView.swift */; }; 27 | 761DE0A124501DFE009D33E5 /* SearchBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761DE0A024501DFE009D33E5 /* SearchBar.swift */; }; 28 | 761DE0A32450BB3D009D33E5 /* HeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761DE0A22450BB3D009D33E5 /* HeaderView.swift */; }; 29 | 761DE0A52450C015009D33E5 /* BusinessFragmentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761DE0A42450C015009D33E5 /* BusinessFragmentView.swift */; }; 30 | 761DE0A82450C26D009D33E5 /* SDWebImageSwiftUI in Frameworks */ = {isa = PBXBuildFile; productRef = 761DE0A72450C26D009D33E5 /* SDWebImageSwiftUI */; }; 31 | 761DE0AA2450C7F8009D33E5 /* Double_Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 761DE0A92450C7F8009D33E5 /* Double_Extensions.swift */; }; 32 | /* End PBXBuildFile section */ 33 | 34 | /* Begin PBXFileReference section */ 35 | 761DE066244E5B5B009D33E5 /* GraphQLSwiftUI.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GraphQLSwiftUI.app; sourceTree = BUILT_PRODUCTS_DIR; }; 36 | 761DE069244E5B5B009D33E5 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 37 | 761DE06B244E5B5B009D33E5 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; 38 | 761DE06D244E5B5B009D33E5 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 39 | 761DE06F244E5B5C009D33E5 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 40 | 761DE072244E5B5C009D33E5 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 41 | 761DE075244E5B5C009D33E5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 42 | 761DE077244E5B5C009D33E5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 43 | 761DE07E244E5B8C009D33E5 /* Businesses.graphql */ = {isa = PBXFileReference; lastKnownFileType = text; path = Businesses.graphql; sourceTree = ""; }; 44 | 761DE080244E5D51009D33E5 /* API.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = API.swift; sourceTree = ""; }; 45 | 761DE08E244E61AF009D33E5 /* ApolloRequestCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApolloRequestCoordinator.swift; sourceTree = ""; }; 46 | 761DE093244E73E1009D33E5 /* ApolloController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApolloController.swift; sourceTree = ""; }; 47 | 761DE096244EAD25009D33E5 /* BusinessFragment_Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BusinessFragment_Extensions.swift; sourceTree = ""; }; 48 | 761DE09C244F5273009D33E5 /* LocationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocationController.swift; sourceTree = ""; }; 49 | 761DE09E2450159E009D33E5 /* LocationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocationView.swift; sourceTree = ""; }; 50 | 761DE0A024501DFE009D33E5 /* SearchBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchBar.swift; sourceTree = ""; }; 51 | 761DE0A22450BB3D009D33E5 /* HeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HeaderView.swift; sourceTree = ""; }; 52 | 761DE0A42450C015009D33E5 /* BusinessFragmentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BusinessFragmentView.swift; sourceTree = ""; }; 53 | 761DE0A92450C7F8009D33E5 /* Double_Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Double_Extensions.swift; sourceTree = ""; }; 54 | /* End PBXFileReference section */ 55 | 56 | /* Begin PBXFrameworksBuildPhase section */ 57 | 761DE063244E5B5B009D33E5 /* Frameworks */ = { 58 | isa = PBXFrameworksBuildPhase; 59 | buildActionMask = 2147483647; 60 | files = ( 61 | 761DE0A82450C26D009D33E5 /* SDWebImageSwiftUI in Frameworks */, 62 | 761DE085244E5FE4009D33E5 /* ApolloSQLite in Frameworks */, 63 | 761DE089244E5FE4009D33E5 /* Apollo in Frameworks */, 64 | 761DE087244E5FE4009D33E5 /* ApolloWebSocket in Frameworks */, 65 | 761DE08B244E5FE4009D33E5 /* ApolloCodegenLib in Frameworks */, 66 | ); 67 | runOnlyForDeploymentPostprocessing = 0; 68 | }; 69 | /* End PBXFrameworksBuildPhase section */ 70 | 71 | /* Begin PBXGroup section */ 72 | 761DE05D244E5B5B009D33E5 = { 73 | isa = PBXGroup; 74 | children = ( 75 | 761DE068244E5B5B009D33E5 /* GraphQLSwiftUI */, 76 | 761DE067244E5B5B009D33E5 /* Products */, 77 | ); 78 | sourceTree = ""; 79 | }; 80 | 761DE067244E5B5B009D33E5 /* Products */ = { 81 | isa = PBXGroup; 82 | children = ( 83 | 761DE066244E5B5B009D33E5 /* GraphQLSwiftUI.app */, 84 | ); 85 | name = Products; 86 | sourceTree = ""; 87 | }; 88 | 761DE068244E5B5B009D33E5 /* GraphQLSwiftUI */ = { 89 | isa = PBXGroup; 90 | children = ( 91 | 761DE09B244F5262009D33E5 /* Controllers */, 92 | 761DE095244EACFE009D33E5 /* Extensions */, 93 | 761DE08C244E617D009D33E5 /* Views */, 94 | 761DE07D244E5B79009D33E5 /* GraphQL */, 95 | 761DE069244E5B5B009D33E5 /* AppDelegate.swift */, 96 | 761DE06B244E5B5B009D33E5 /* SceneDelegate.swift */, 97 | 761DE06F244E5B5C009D33E5 /* Assets.xcassets */, 98 | 761DE074244E5B5C009D33E5 /* LaunchScreen.storyboard */, 99 | 761DE077244E5B5C009D33E5 /* Info.plist */, 100 | 761DE071244E5B5C009D33E5 /* Preview Content */, 101 | ); 102 | path = GraphQLSwiftUI; 103 | sourceTree = ""; 104 | }; 105 | 761DE071244E5B5C009D33E5 /* Preview Content */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | 761DE072244E5B5C009D33E5 /* Preview Assets.xcassets */, 109 | ); 110 | path = "Preview Content"; 111 | sourceTree = ""; 112 | }; 113 | 761DE07D244E5B79009D33E5 /* GraphQL */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | 761DE080244E5D51009D33E5 /* API.swift */, 117 | 761DE07E244E5B8C009D33E5 /* Businesses.graphql */, 118 | ); 119 | path = GraphQL; 120 | sourceTree = ""; 121 | }; 122 | 761DE08C244E617D009D33E5 /* Views */ = { 123 | isa = PBXGroup; 124 | children = ( 125 | 761DE06D244E5B5B009D33E5 /* ContentView.swift */, 126 | 761DE09E2450159E009D33E5 /* LocationView.swift */, 127 | 761DE0A024501DFE009D33E5 /* SearchBar.swift */, 128 | 761DE0A22450BB3D009D33E5 /* HeaderView.swift */, 129 | 761DE0A42450C015009D33E5 /* BusinessFragmentView.swift */, 130 | ); 131 | path = Views; 132 | sourceTree = ""; 133 | }; 134 | 761DE08D244E6186009D33E5 /* Networking */ = { 135 | isa = PBXGroup; 136 | children = ( 137 | 761DE08E244E61AF009D33E5 /* ApolloRequestCoordinator.swift */, 138 | 761DE093244E73E1009D33E5 /* ApolloController.swift */, 139 | ); 140 | path = Networking; 141 | sourceTree = ""; 142 | }; 143 | 761DE095244EACFE009D33E5 /* Extensions */ = { 144 | isa = PBXGroup; 145 | children = ( 146 | 761DE096244EAD25009D33E5 /* BusinessFragment_Extensions.swift */, 147 | 761DE0A92450C7F8009D33E5 /* Double_Extensions.swift */, 148 | ); 149 | path = Extensions; 150 | sourceTree = ""; 151 | }; 152 | 761DE09B244F5262009D33E5 /* Controllers */ = { 153 | isa = PBXGroup; 154 | children = ( 155 | 761DE08D244E6186009D33E5 /* Networking */, 156 | 761DE09C244F5273009D33E5 /* LocationController.swift */, 157 | ); 158 | path = Controllers; 159 | sourceTree = ""; 160 | }; 161 | /* End PBXGroup section */ 162 | 163 | /* Begin PBXNativeTarget section */ 164 | 761DE065244E5B5B009D33E5 /* GraphQLSwiftUI */ = { 165 | isa = PBXNativeTarget; 166 | buildConfigurationList = 761DE07A244E5B5C009D33E5 /* Build configuration list for PBXNativeTarget "GraphQLSwiftUI" */; 167 | buildPhases = ( 168 | 761DE082244E5F47009D33E5 /* ShellScript */, 169 | 761DE062244E5B5B009D33E5 /* Sources */, 170 | 761DE063244E5B5B009D33E5 /* Frameworks */, 171 | 761DE064244E5B5B009D33E5 /* Resources */, 172 | ); 173 | buildRules = ( 174 | ); 175 | dependencies = ( 176 | ); 177 | name = GraphQLSwiftUI; 178 | packageProductDependencies = ( 179 | 761DE084244E5FE4009D33E5 /* ApolloSQLite */, 180 | 761DE086244E5FE4009D33E5 /* ApolloWebSocket */, 181 | 761DE088244E5FE4009D33E5 /* Apollo */, 182 | 761DE08A244E5FE4009D33E5 /* ApolloCodegenLib */, 183 | 761DE0A72450C26D009D33E5 /* SDWebImageSwiftUI */, 184 | ); 185 | productName = GraphQLSwiftUI; 186 | productReference = 761DE066244E5B5B009D33E5 /* GraphQLSwiftUI.app */; 187 | productType = "com.apple.product-type.application"; 188 | }; 189 | /* End PBXNativeTarget section */ 190 | 191 | /* Begin PBXProject section */ 192 | 761DE05E244E5B5B009D33E5 /* Project object */ = { 193 | isa = PBXProject; 194 | attributes = { 195 | LastSwiftUpdateCheck = 1140; 196 | LastUpgradeCheck = 1140; 197 | ORGANIZATIONNAME = TouchToFly; 198 | TargetAttributes = { 199 | 761DE065244E5B5B009D33E5 = { 200 | CreatedOnToolsVersion = 11.4.1; 201 | }; 202 | }; 203 | }; 204 | buildConfigurationList = 761DE061244E5B5B009D33E5 /* Build configuration list for PBXProject "GraphQLSwiftUI" */; 205 | compatibilityVersion = "Xcode 9.3"; 206 | developmentRegion = en; 207 | hasScannedForEncodings = 0; 208 | knownRegions = ( 209 | en, 210 | Base, 211 | ); 212 | mainGroup = 761DE05D244E5B5B009D33E5; 213 | packageReferences = ( 214 | 761DE083244E5FE4009D33E5 /* XCRemoteSwiftPackageReference "apollo-ios" */, 215 | 761DE0A62450C26D009D33E5 /* XCRemoteSwiftPackageReference "SDWebImageSwiftUI" */, 216 | ); 217 | productRefGroup = 761DE067244E5B5B009D33E5 /* Products */; 218 | projectDirPath = ""; 219 | projectRoot = ""; 220 | targets = ( 221 | 761DE065244E5B5B009D33E5 /* GraphQLSwiftUI */, 222 | ); 223 | }; 224 | /* End PBXProject section */ 225 | 226 | /* Begin PBXResourcesBuildPhase section */ 227 | 761DE064244E5B5B009D33E5 /* Resources */ = { 228 | isa = PBXResourcesBuildPhase; 229 | buildActionMask = 2147483647; 230 | files = ( 231 | 761DE076244E5B5C009D33E5 /* LaunchScreen.storyboard in Resources */, 232 | 761DE073244E5B5C009D33E5 /* Preview Assets.xcassets in Resources */, 233 | 761DE070244E5B5C009D33E5 /* Assets.xcassets in Resources */, 234 | 761DE07F244E5B8C009D33E5 /* Businesses.graphql in Resources */, 235 | ); 236 | runOnlyForDeploymentPostprocessing = 0; 237 | }; 238 | /* End PBXResourcesBuildPhase section */ 239 | 240 | /* Begin PBXShellScriptBuildPhase section */ 241 | 761DE082244E5F47009D33E5 /* ShellScript */ = { 242 | isa = PBXShellScriptBuildPhase; 243 | buildActionMask = 2147483647; 244 | files = ( 245 | ); 246 | inputFileListPaths = ( 247 | ); 248 | inputPaths = ( 249 | ); 250 | outputFileListPaths = ( 251 | ); 252 | outputPaths = ( 253 | ); 254 | runOnlyForDeploymentPostprocessing = 0; 255 | shellPath = /bin/sh; 256 | shellScript = "cd \"${SRCROOT}\"/Codegen\nxcrun -sdk macosx swift run\n"; 257 | }; 258 | /* End PBXShellScriptBuildPhase section */ 259 | 260 | /* Begin PBXSourcesBuildPhase section */ 261 | 761DE062244E5B5B009D33E5 /* Sources */ = { 262 | isa = PBXSourcesBuildPhase; 263 | buildActionMask = 2147483647; 264 | files = ( 265 | 761DE06A244E5B5B009D33E5 /* AppDelegate.swift in Sources */, 266 | 761DE06C244E5B5B009D33E5 /* SceneDelegate.swift in Sources */, 267 | 761DE081244E5D51009D33E5 /* API.swift in Sources */, 268 | 761DE094244E73E1009D33E5 /* ApolloController.swift in Sources */, 269 | 761DE09D244F5273009D33E5 /* LocationController.swift in Sources */, 270 | 761DE08F244E61AF009D33E5 /* ApolloRequestCoordinator.swift in Sources */, 271 | 761DE06E244E5B5B009D33E5 /* ContentView.swift in Sources */, 272 | 761DE0A32450BB3D009D33E5 /* HeaderView.swift in Sources */, 273 | 761DE0AA2450C7F8009D33E5 /* Double_Extensions.swift in Sources */, 274 | 761DE0A52450C015009D33E5 /* BusinessFragmentView.swift in Sources */, 275 | 761DE09F2450159E009D33E5 /* LocationView.swift in Sources */, 276 | 761DE0A124501DFE009D33E5 /* SearchBar.swift in Sources */, 277 | 761DE097244EAD25009D33E5 /* BusinessFragment_Extensions.swift in Sources */, 278 | ); 279 | runOnlyForDeploymentPostprocessing = 0; 280 | }; 281 | /* End PBXSourcesBuildPhase section */ 282 | 283 | /* Begin PBXVariantGroup section */ 284 | 761DE074244E5B5C009D33E5 /* LaunchScreen.storyboard */ = { 285 | isa = PBXVariantGroup; 286 | children = ( 287 | 761DE075244E5B5C009D33E5 /* Base */, 288 | ); 289 | name = LaunchScreen.storyboard; 290 | sourceTree = ""; 291 | }; 292 | /* End PBXVariantGroup section */ 293 | 294 | /* Begin XCBuildConfiguration section */ 295 | 761DE078244E5B5C009D33E5 /* Debug */ = { 296 | isa = XCBuildConfiguration; 297 | buildSettings = { 298 | ALWAYS_SEARCH_USER_PATHS = NO; 299 | CLANG_ANALYZER_NONNULL = YES; 300 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 301 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 302 | CLANG_CXX_LIBRARY = "libc++"; 303 | CLANG_ENABLE_MODULES = YES; 304 | CLANG_ENABLE_OBJC_ARC = YES; 305 | CLANG_ENABLE_OBJC_WEAK = YES; 306 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 307 | CLANG_WARN_BOOL_CONVERSION = YES; 308 | CLANG_WARN_COMMA = YES; 309 | CLANG_WARN_CONSTANT_CONVERSION = YES; 310 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 311 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 312 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 313 | CLANG_WARN_EMPTY_BODY = YES; 314 | CLANG_WARN_ENUM_CONVERSION = YES; 315 | CLANG_WARN_INFINITE_RECURSION = YES; 316 | CLANG_WARN_INT_CONVERSION = YES; 317 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 318 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 319 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 320 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 321 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 322 | CLANG_WARN_STRICT_PROTOTYPES = YES; 323 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 324 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 325 | CLANG_WARN_UNREACHABLE_CODE = YES; 326 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 327 | COPY_PHASE_STRIP = NO; 328 | DEBUG_INFORMATION_FORMAT = dwarf; 329 | ENABLE_STRICT_OBJC_MSGSEND = YES; 330 | ENABLE_TESTABILITY = YES; 331 | GCC_C_LANGUAGE_STANDARD = gnu11; 332 | GCC_DYNAMIC_NO_PIC = NO; 333 | GCC_NO_COMMON_BLOCKS = YES; 334 | GCC_OPTIMIZATION_LEVEL = 0; 335 | GCC_PREPROCESSOR_DEFINITIONS = ( 336 | "DEBUG=1", 337 | "$(inherited)", 338 | ); 339 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 340 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 341 | GCC_WARN_UNDECLARED_SELECTOR = YES; 342 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 343 | GCC_WARN_UNUSED_FUNCTION = YES; 344 | GCC_WARN_UNUSED_VARIABLE = YES; 345 | IPHONEOS_DEPLOYMENT_TARGET = 13.4; 346 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 347 | MTL_FAST_MATH = YES; 348 | ONLY_ACTIVE_ARCH = YES; 349 | SDKROOT = iphoneos; 350 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 351 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 352 | }; 353 | name = Debug; 354 | }; 355 | 761DE079244E5B5C009D33E5 /* Release */ = { 356 | isa = XCBuildConfiguration; 357 | buildSettings = { 358 | ALWAYS_SEARCH_USER_PATHS = NO; 359 | CLANG_ANALYZER_NONNULL = YES; 360 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 361 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 362 | CLANG_CXX_LIBRARY = "libc++"; 363 | CLANG_ENABLE_MODULES = YES; 364 | CLANG_ENABLE_OBJC_ARC = YES; 365 | CLANG_ENABLE_OBJC_WEAK = YES; 366 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 367 | CLANG_WARN_BOOL_CONVERSION = YES; 368 | CLANG_WARN_COMMA = YES; 369 | CLANG_WARN_CONSTANT_CONVERSION = YES; 370 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 371 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 372 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 373 | CLANG_WARN_EMPTY_BODY = YES; 374 | CLANG_WARN_ENUM_CONVERSION = YES; 375 | CLANG_WARN_INFINITE_RECURSION = YES; 376 | CLANG_WARN_INT_CONVERSION = YES; 377 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 378 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 379 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 380 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 381 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 382 | CLANG_WARN_STRICT_PROTOTYPES = YES; 383 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 384 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 385 | CLANG_WARN_UNREACHABLE_CODE = YES; 386 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 387 | COPY_PHASE_STRIP = NO; 388 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 389 | ENABLE_NS_ASSERTIONS = NO; 390 | ENABLE_STRICT_OBJC_MSGSEND = YES; 391 | GCC_C_LANGUAGE_STANDARD = gnu11; 392 | GCC_NO_COMMON_BLOCKS = YES; 393 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 394 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 395 | GCC_WARN_UNDECLARED_SELECTOR = YES; 396 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 397 | GCC_WARN_UNUSED_FUNCTION = YES; 398 | GCC_WARN_UNUSED_VARIABLE = YES; 399 | IPHONEOS_DEPLOYMENT_TARGET = 13.4; 400 | MTL_ENABLE_DEBUG_INFO = NO; 401 | MTL_FAST_MATH = YES; 402 | SDKROOT = iphoneos; 403 | SWIFT_COMPILATION_MODE = wholemodule; 404 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 405 | VALIDATE_PRODUCT = YES; 406 | }; 407 | name = Release; 408 | }; 409 | 761DE07B244E5B5C009D33E5 /* Debug */ = { 410 | isa = XCBuildConfiguration; 411 | buildSettings = { 412 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 413 | CODE_SIGN_STYLE = Automatic; 414 | DEVELOPMENT_ASSET_PATHS = "\"GraphQLSwiftUI/Preview Content\""; 415 | DEVELOPMENT_TEAM = WEZXTSQ23M; 416 | ENABLE_PREVIEWS = YES; 417 | INFOPLIST_FILE = GraphQLSwiftUI/Info.plist; 418 | IPHONEOS_DEPLOYMENT_TARGET = 13.3; 419 | LD_RUNPATH_SEARCH_PATHS = ( 420 | "$(inherited)", 421 | "@executable_path/Frameworks", 422 | ); 423 | PRODUCT_BUNDLE_IDENTIFIER = com.demo.GraphQLSwiftUI; 424 | PRODUCT_NAME = "$(TARGET_NAME)"; 425 | SWIFT_VERSION = 5.0; 426 | TARGETED_DEVICE_FAMILY = "1,2"; 427 | }; 428 | name = Debug; 429 | }; 430 | 761DE07C244E5B5C009D33E5 /* Release */ = { 431 | isa = XCBuildConfiguration; 432 | buildSettings = { 433 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 434 | CODE_SIGN_STYLE = Automatic; 435 | DEVELOPMENT_ASSET_PATHS = "\"GraphQLSwiftUI/Preview Content\""; 436 | DEVELOPMENT_TEAM = WEZXTSQ23M; 437 | ENABLE_PREVIEWS = YES; 438 | INFOPLIST_FILE = GraphQLSwiftUI/Info.plist; 439 | IPHONEOS_DEPLOYMENT_TARGET = 13.3; 440 | LD_RUNPATH_SEARCH_PATHS = ( 441 | "$(inherited)", 442 | "@executable_path/Frameworks", 443 | ); 444 | PRODUCT_BUNDLE_IDENTIFIER = com.demo.GraphQLSwiftUI; 445 | PRODUCT_NAME = "$(TARGET_NAME)"; 446 | SWIFT_VERSION = 5.0; 447 | TARGETED_DEVICE_FAMILY = "1,2"; 448 | }; 449 | name = Release; 450 | }; 451 | /* End XCBuildConfiguration section */ 452 | 453 | /* Begin XCConfigurationList section */ 454 | 761DE061244E5B5B009D33E5 /* Build configuration list for PBXProject "GraphQLSwiftUI" */ = { 455 | isa = XCConfigurationList; 456 | buildConfigurations = ( 457 | 761DE078244E5B5C009D33E5 /* Debug */, 458 | 761DE079244E5B5C009D33E5 /* Release */, 459 | ); 460 | defaultConfigurationIsVisible = 0; 461 | defaultConfigurationName = Release; 462 | }; 463 | 761DE07A244E5B5C009D33E5 /* Build configuration list for PBXNativeTarget "GraphQLSwiftUI" */ = { 464 | isa = XCConfigurationList; 465 | buildConfigurations = ( 466 | 761DE07B244E5B5C009D33E5 /* Debug */, 467 | 761DE07C244E5B5C009D33E5 /* Release */, 468 | ); 469 | defaultConfigurationIsVisible = 0; 470 | defaultConfigurationName = Release; 471 | }; 472 | /* End XCConfigurationList section */ 473 | 474 | /* Begin XCRemoteSwiftPackageReference section */ 475 | 761DE083244E5FE4009D33E5 /* XCRemoteSwiftPackageReference "apollo-ios" */ = { 476 | isa = XCRemoteSwiftPackageReference; 477 | repositoryURL = "https://github.com/apollographql/apollo-ios.git"; 478 | requirement = { 479 | kind = upToNextMajorVersion; 480 | minimumVersion = 0.25.0; 481 | }; 482 | }; 483 | 761DE0A62450C26D009D33E5 /* XCRemoteSwiftPackageReference "SDWebImageSwiftUI" */ = { 484 | isa = XCRemoteSwiftPackageReference; 485 | repositoryURL = "https://github.com/SDWebImage/SDWebImageSwiftUI.git"; 486 | requirement = { 487 | kind = upToNextMajorVersion; 488 | minimumVersion = 1.3.3; 489 | }; 490 | }; 491 | /* End XCRemoteSwiftPackageReference section */ 492 | 493 | /* Begin XCSwiftPackageProductDependency section */ 494 | 761DE084244E5FE4009D33E5 /* ApolloSQLite */ = { 495 | isa = XCSwiftPackageProductDependency; 496 | package = 761DE083244E5FE4009D33E5 /* XCRemoteSwiftPackageReference "apollo-ios" */; 497 | productName = ApolloSQLite; 498 | }; 499 | 761DE086244E5FE4009D33E5 /* ApolloWebSocket */ = { 500 | isa = XCSwiftPackageProductDependency; 501 | package = 761DE083244E5FE4009D33E5 /* XCRemoteSwiftPackageReference "apollo-ios" */; 502 | productName = ApolloWebSocket; 503 | }; 504 | 761DE088244E5FE4009D33E5 /* Apollo */ = { 505 | isa = XCSwiftPackageProductDependency; 506 | package = 761DE083244E5FE4009D33E5 /* XCRemoteSwiftPackageReference "apollo-ios" */; 507 | productName = Apollo; 508 | }; 509 | 761DE08A244E5FE4009D33E5 /* ApolloCodegenLib */ = { 510 | isa = XCSwiftPackageProductDependency; 511 | package = 761DE083244E5FE4009D33E5 /* XCRemoteSwiftPackageReference "apollo-ios" */; 512 | productName = ApolloCodegenLib; 513 | }; 514 | 761DE0A72450C26D009D33E5 /* SDWebImageSwiftUI */ = { 515 | isa = XCSwiftPackageProductDependency; 516 | package = 761DE0A62450C26D009D33E5 /* XCRemoteSwiftPackageReference "SDWebImageSwiftUI" */; 517 | productName = SDWebImageSwiftUI; 518 | }; 519 | /* End XCSwiftPackageProductDependency section */ 520 | }; 521 | rootObject = 761DE05E244E5B5B009D33E5 /* Project object */; 522 | } 523 | -------------------------------------------------------------------------------- /GraphQLSwiftUI/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // GraphQLSwiftUI 4 | // 5 | // Created by TouchToFly on 4/20/20. 6 | // Copyright © 2020 TouchToFly. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | // Override point for customization after application launch. 18 | return true 19 | } 20 | 21 | // MARK: UISceneSession Lifecycle 22 | 23 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 24 | // Called when a new scene session is being created. 25 | // Use this method to select a configuration to create the new scene with. 26 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 27 | } 28 | 29 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 30 | // Called when the user discards a scene session. 31 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 32 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 33 | } 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /GraphQLSwiftUI/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "scale" : "1x", 46 | "size" : "20x20" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "scale" : "2x", 51 | "size" : "20x20" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "scale" : "1x", 56 | "size" : "29x29" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "29x29" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "scale" : "1x", 66 | "size" : "40x40" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "scale" : "2x", 71 | "size" : "40x40" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "scale" : "1x", 76 | "size" : "76x76" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "scale" : "2x", 81 | "size" : "76x76" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "scale" : "2x", 86 | "size" : "83.5x83.5" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "scale" : "1x", 91 | "size" : "1024x1024" 92 | } 93 | ], 94 | "info" : { 95 | "author" : "xcode", 96 | "version" : 1 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /GraphQLSwiftUI/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /GraphQLSwiftUI/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /GraphQLSwiftUI/Controllers/LocationController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LocationController.swift 3 | // GraphQLSwiftUI 4 | // 5 | // Created by TouchToFly on 4/21/20. 6 | // Copyright © 2020 TouchToFly. All rights reserved. 7 | // 8 | 9 | import CoreLocation 10 | import Combine 11 | 12 | class LocationController: NSObject, ObservableObject { 13 | //MARK: Published properties 14 | @Published var location: CLLocation = CLLocation.init() 15 | 16 | @Published var authorization: CLAuthorizationStatus = CLLocationManager.authorizationStatus() 17 | 18 | @Published var locationServicesError: Error? 19 | 20 | 21 | //MARK: Other properties 22 | let manager: CLLocationManager = CLLocationManager.init() 23 | 24 | //MARK: Init 25 | override init() { 26 | super.init() 27 | self.manager.delegate = self 28 | guard CLLocationManager.locationServicesEnabled() == true && self.authorization == .authorizedWhenInUse else { 29 | return 30 | } 31 | self.manager.startMonitoringSignificantLocationChanges() 32 | self.manager.requestLocation() 33 | } 34 | 35 | 36 | } 37 | 38 | extension LocationController: CLLocationManagerDelegate { 39 | func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) { 40 | self.authorization = status 41 | guard self.authorization == .authorizedWhenInUse else { 42 | return 43 | } 44 | self.manager.startMonitoringSignificantLocationChanges() 45 | self.manager.requestLocation() 46 | } 47 | func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) { 48 | self.locationServicesError = error 49 | } 50 | func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) { 51 | guard let location = locations.first else { 52 | return 53 | } 54 | self.location = location 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /GraphQLSwiftUI/Controllers/Networking/ApolloController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ApolloClient.swift 3 | // GraphQLSwiftUI 4 | // 5 | // Created by TouchToFly on 4/20/20. 6 | // Copyright © 2020 TouchToFly. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import Apollo 11 | 12 | // MARK: - Singleton Wrapper 13 | 14 | class ApolloController { 15 | 16 | static let shared = ApolloController() 17 | 18 | let YELP_API_KEY = "" 19 | 20 | // Configure the network transport to use the singleton as the delegate. 21 | private lazy var networkTransport: HTTPNetworkTransport = { 22 | let transport = HTTPNetworkTransport(url: URL(string: "https://api.yelp.com/v3/graphql")!) 23 | transport.delegate = self 24 | return transport 25 | }() 26 | 27 | // Use the configured network transport in your Apollo client. 28 | private(set) lazy var client = ApolloClient.init(networkTransport: self.networkTransport) 29 | } 30 | 31 | // MARK: - Pre-flight delegate 32 | 33 | extension ApolloController: HTTPNetworkTransportPreflightDelegate { 34 | 35 | func networkTransport(_ networkTransport: HTTPNetworkTransport, shouldSend request: URLRequest) -> Bool { 36 | return true 37 | } 38 | 39 | func networkTransport(_ networkTransport: HTTPNetworkTransport, willSend request: inout URLRequest) { 40 | 41 | // Get the existing headers, or create new ones if they're nil 42 | var headers = request.allHTTPHeaderFields ?? [String: String]() 43 | 44 | //Needed for YELP API or you get an error about language. 45 | headers["Accept-Language"] = "en_US" 46 | 47 | // Add any new headers you need 48 | headers["Authorization"] = "Bearer \(self.YELP_API_KEY)" 49 | 50 | // Re-assign the updated headers to the request. 51 | request.allHTTPHeaderFields = headers 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /GraphQLSwiftUI/Controllers/Networking/ApolloRequestCoordinator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ApolloNetworkingController.swift 3 | // GraphQLSwiftUI 4 | // 5 | // Created by TouchToFly on 4/20/20. 6 | // Copyright © 2020 TouchToFly. All rights reserved. 7 | // 8 | 9 | import Combine 10 | import Apollo 11 | import CoreLocation 12 | 13 | class ApolloNetworkingController: ObservableObject { 14 | 15 | @Published var businesses: [BusinessFragment] = [] 16 | 17 | @Published var businessesQueryRunning: Bool = false 18 | 19 | @Published var businessesQueryError: Error? 20 | 21 | @Published var searchText: String = "Food" 22 | 23 | lazy var locationController: LocationController = LocationController() 24 | 25 | //MARK: Combine Subscriptions 26 | var searchTextSubscription: AnyCancellable? 27 | 28 | var locationSubscription: AnyCancellable? 29 | 30 | init() { 31 | self.searchTextSubscription = self.$searchText.debounce(for: .milliseconds(500), scheduler: RunLoop.main).sink(receiveValue: { (newSearchText) in 32 | print(newSearchText) 33 | self.retrieveBusinesses(searchText: newSearchText, location: self.locationController.location.coordinate) 34 | }) 35 | self.locationSubscription = self.locationController.$location.sink(receiveValue: { (location) in 36 | self.retrieveBusinesses(searchText: self.searchText, location: location.coordinate) 37 | }) 38 | self.retrieveBusinesses(searchText: self.searchText, location: self.locationController.location.coordinate) 39 | } 40 | 41 | func retrieveBusinesses(searchText text: String, location: CLLocationCoordinate2D) { 42 | self.businessesQueryError = nil 43 | self.businessesQueryRunning = true 44 | self.businesses.removeAll() 45 | let query = BusinessesQuery.init(searchTerm: text, latitude: location.latitude, longitude: location.longitude) 46 | ApolloController.shared.client.fetch(query: query) { (results) in 47 | self.businessesQueryRunning = false 48 | switch results { 49 | case .failure(let error): 50 | self.businessesQueryError = error 51 | case .success(let graphQLResults): 52 | 53 | guard let searchResults = graphQLResults.data?.search?.business else { 54 | break 55 | } 56 | 57 | for item in searchResults { 58 | if let fragment = item?.fragments.businessFragment { 59 | self.businesses.append(fragment) 60 | } 61 | } 62 | } 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /GraphQLSwiftUI/Extensions/BusinessFragment_Extensions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BusinessFragment_Extensions.swift 3 | // GraphQLSwiftUI 4 | // 5 | // Created by TouchToFly on 4/20/20. 6 | // Copyright © 2020 TouchToFly. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | 12 | extension BusinessFragment: Identifiable { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /GraphQLSwiftUI/Extensions/Double_Extensions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Double_Extensions.swift 3 | // GraphQLSwiftUI 4 | // 5 | // Created by TouchToFly on 4/22/20. 6 | // Copyright © 2020 TouchToFly. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | 12 | extension Double { 13 | /// Rounds the double to decimal places value 14 | func rounded(toPlaces places:Int) -> Double { 15 | let divisor = pow(10.0, Double(places)) 16 | return (self * divisor).rounded() / divisor 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /GraphQLSwiftUI/GraphQL/API.swift: -------------------------------------------------------------------------------- 1 | // @generated 2 | // This file was automatically generated and should not be edited. 3 | 4 | import Apollo 5 | import Foundation 6 | 7 | public final class BusinessesQuery: GraphQLQuery { 8 | /// The raw GraphQL definition of this operation. 9 | public let operationDefinition: String = 10 | """ 11 | query Businesses($searchTerm: String, $latitude: Float, $longitude: Float) { 12 | search(term: $searchTerm, latitude: $latitude, longitude: $longitude) { 13 | __typename 14 | business { 15 | __typename 16 | ...BusinessFragment 17 | } 18 | } 19 | } 20 | """ 21 | 22 | public let operationName: String = "Businesses" 23 | 24 | public let operationIdentifier: String? = "3d4c4624f603751075df852991d54d2bc642427f6e777128c813c923a9e248ed" 25 | 26 | public var queryDocument: String { return operationDefinition.appending(BusinessFragment.fragmentDefinition) } 27 | 28 | public var searchTerm: String? 29 | public var latitude: Double? 30 | public var longitude: Double? 31 | 32 | public init(searchTerm: String? = nil, latitude: Double? = nil, longitude: Double? = nil) { 33 | self.searchTerm = searchTerm 34 | self.latitude = latitude 35 | self.longitude = longitude 36 | } 37 | 38 | public var variables: GraphQLMap? { 39 | return ["searchTerm": searchTerm, "latitude": latitude, "longitude": longitude] 40 | } 41 | 42 | public struct Data: GraphQLSelectionSet { 43 | public static let possibleTypes: [String] = ["Query"] 44 | 45 | public static let selections: [GraphQLSelection] = [ 46 | GraphQLField("search", arguments: ["term": GraphQLVariable("searchTerm"), "latitude": GraphQLVariable("latitude"), "longitude": GraphQLVariable("longitude")], type: .object(Search.selections)), 47 | ] 48 | 49 | public private(set) var resultMap: ResultMap 50 | 51 | public init(unsafeResultMap: ResultMap) { 52 | self.resultMap = unsafeResultMap 53 | } 54 | 55 | public init(search: Search? = nil) { 56 | self.init(unsafeResultMap: ["__typename": "Query", "search": search.flatMap { (value: Search) -> ResultMap in value.resultMap }]) 57 | } 58 | 59 | /// Search for businesses on Yelp. 60 | public var search: Search? { 61 | get { 62 | return (resultMap["search"] as? ResultMap).flatMap { Search(unsafeResultMap: $0) } 63 | } 64 | set { 65 | resultMap.updateValue(newValue?.resultMap, forKey: "search") 66 | } 67 | } 68 | 69 | public struct Search: GraphQLSelectionSet { 70 | public static let possibleTypes: [String] = ["Businesses"] 71 | 72 | public static let selections: [GraphQLSelection] = [ 73 | GraphQLField("__typename", type: .nonNull(.scalar(String.self))), 74 | GraphQLField("business", type: .list(.object(Business.selections))), 75 | ] 76 | 77 | public private(set) var resultMap: ResultMap 78 | 79 | public init(unsafeResultMap: ResultMap) { 80 | self.resultMap = unsafeResultMap 81 | } 82 | 83 | public init(business: [Business?]? = nil) { 84 | self.init(unsafeResultMap: ["__typename": "Businesses", "business": business.flatMap { (value: [Business?]) -> [ResultMap?] in value.map { (value: Business?) -> ResultMap? in value.flatMap { (value: Business) -> ResultMap in value.resultMap } } }]) 85 | } 86 | 87 | public var __typename: String { 88 | get { 89 | return resultMap["__typename"]! as! String 90 | } 91 | set { 92 | resultMap.updateValue(newValue, forKey: "__typename") 93 | } 94 | } 95 | 96 | /// A list of business Yelp finds based on the search criteria. 97 | public var business: [Business?]? { 98 | get { 99 | return (resultMap["business"] as? [ResultMap?]).flatMap { (value: [ResultMap?]) -> [Business?] in value.map { (value: ResultMap?) -> Business? in value.flatMap { (value: ResultMap) -> Business in Business(unsafeResultMap: value) } } } 100 | } 101 | set { 102 | resultMap.updateValue(newValue.flatMap { (value: [Business?]) -> [ResultMap?] in value.map { (value: Business?) -> ResultMap? in value.flatMap { (value: Business) -> ResultMap in value.resultMap } } }, forKey: "business") 103 | } 104 | } 105 | 106 | public struct Business: GraphQLSelectionSet { 107 | public static let possibleTypes: [String] = ["Business"] 108 | 109 | public static let selections: [GraphQLSelection] = [ 110 | GraphQLField("__typename", type: .nonNull(.scalar(String.self))), 111 | GraphQLField("__typename", type: .nonNull(.scalar(String.self))), 112 | GraphQLField("id", type: .scalar(String.self)), 113 | GraphQLField("name", type: .scalar(String.self)), 114 | GraphQLField("url", type: .scalar(String.self)), 115 | GraphQLField("rating", type: .scalar(Double.self)), 116 | GraphQLField("photos", type: .list(.scalar(String.self))), 117 | GraphQLField("distance", type: .scalar(Double.self)), 118 | ] 119 | 120 | public private(set) var resultMap: ResultMap 121 | 122 | public init(unsafeResultMap: ResultMap) { 123 | self.resultMap = unsafeResultMap 124 | } 125 | 126 | public init(id: String? = nil, name: String? = nil, url: String? = nil, rating: Double? = nil, photos: [String?]? = nil, distance: Double? = nil) { 127 | self.init(unsafeResultMap: ["__typename": "Business", "id": id, "name": name, "url": url, "rating": rating, "photos": photos, "distance": distance]) 128 | } 129 | 130 | public var __typename: String { 131 | get { 132 | return resultMap["__typename"]! as! String 133 | } 134 | set { 135 | resultMap.updateValue(newValue, forKey: "__typename") 136 | } 137 | } 138 | 139 | /// Yelp ID of this business. 140 | public var id: String? { 141 | get { 142 | return resultMap["id"] as? String 143 | } 144 | set { 145 | resultMap.updateValue(newValue, forKey: "id") 146 | } 147 | } 148 | 149 | /// Name of this business. 150 | public var name: String? { 151 | get { 152 | return resultMap["name"] as? String 153 | } 154 | set { 155 | resultMap.updateValue(newValue, forKey: "name") 156 | } 157 | } 158 | 159 | /// URL for business page on Yelp. 160 | public var url: String? { 161 | get { 162 | return resultMap["url"] as? String 163 | } 164 | set { 165 | resultMap.updateValue(newValue, forKey: "url") 166 | } 167 | } 168 | 169 | /// Rating for this business (value ranges from 1, 1.5, ... 4.5, 5). 170 | public var rating: Double? { 171 | get { 172 | return resultMap["rating"] as? Double 173 | } 174 | set { 175 | resultMap.updateValue(newValue, forKey: "rating") 176 | } 177 | } 178 | 179 | /// URLs of up to three photos of the business. 180 | public var photos: [String?]? { 181 | get { 182 | return resultMap["photos"] as? [String?] 183 | } 184 | set { 185 | resultMap.updateValue(newValue, forKey: "photos") 186 | } 187 | } 188 | 189 | /// When searching, this provides the distance of the business from the search location in meters 190 | public var distance: Double? { 191 | get { 192 | return resultMap["distance"] as? Double 193 | } 194 | set { 195 | resultMap.updateValue(newValue, forKey: "distance") 196 | } 197 | } 198 | 199 | public var fragments: Fragments { 200 | get { 201 | return Fragments(unsafeResultMap: resultMap) 202 | } 203 | set { 204 | resultMap += newValue.resultMap 205 | } 206 | } 207 | 208 | public struct Fragments { 209 | public private(set) var resultMap: ResultMap 210 | 211 | public init(unsafeResultMap: ResultMap) { 212 | self.resultMap = unsafeResultMap 213 | } 214 | 215 | public var businessFragment: BusinessFragment { 216 | get { 217 | return BusinessFragment(unsafeResultMap: resultMap) 218 | } 219 | set { 220 | resultMap += newValue.resultMap 221 | } 222 | } 223 | } 224 | } 225 | } 226 | } 227 | } 228 | 229 | public struct BusinessFragment: GraphQLFragment { 230 | /// The raw GraphQL definition of this fragment. 231 | public static let fragmentDefinition: String = 232 | """ 233 | fragment BusinessFragment on Business { 234 | __typename 235 | id 236 | name 237 | url 238 | rating 239 | photos 240 | distance 241 | } 242 | """ 243 | 244 | public static let possibleTypes: [String] = ["Business"] 245 | 246 | public static let selections: [GraphQLSelection] = [ 247 | GraphQLField("__typename", type: .nonNull(.scalar(String.self))), 248 | GraphQLField("id", type: .scalar(String.self)), 249 | GraphQLField("name", type: .scalar(String.self)), 250 | GraphQLField("url", type: .scalar(String.self)), 251 | GraphQLField("rating", type: .scalar(Double.self)), 252 | GraphQLField("photos", type: .list(.scalar(String.self))), 253 | GraphQLField("distance", type: .scalar(Double.self)), 254 | ] 255 | 256 | public private(set) var resultMap: ResultMap 257 | 258 | public init(unsafeResultMap: ResultMap) { 259 | self.resultMap = unsafeResultMap 260 | } 261 | 262 | public init(id: String? = nil, name: String? = nil, url: String? = nil, rating: Double? = nil, photos: [String?]? = nil, distance: Double? = nil) { 263 | self.init(unsafeResultMap: ["__typename": "Business", "id": id, "name": name, "url": url, "rating": rating, "photos": photos, "distance": distance]) 264 | } 265 | 266 | public var __typename: String { 267 | get { 268 | return resultMap["__typename"]! as! String 269 | } 270 | set { 271 | resultMap.updateValue(newValue, forKey: "__typename") 272 | } 273 | } 274 | 275 | /// Yelp ID of this business. 276 | public var id: String? { 277 | get { 278 | return resultMap["id"] as? String 279 | } 280 | set { 281 | resultMap.updateValue(newValue, forKey: "id") 282 | } 283 | } 284 | 285 | /// Name of this business. 286 | public var name: String? { 287 | get { 288 | return resultMap["name"] as? String 289 | } 290 | set { 291 | resultMap.updateValue(newValue, forKey: "name") 292 | } 293 | } 294 | 295 | /// URL for business page on Yelp. 296 | public var url: String? { 297 | get { 298 | return resultMap["url"] as? String 299 | } 300 | set { 301 | resultMap.updateValue(newValue, forKey: "url") 302 | } 303 | } 304 | 305 | /// Rating for this business (value ranges from 1, 1.5, ... 4.5, 5). 306 | public var rating: Double? { 307 | get { 308 | return resultMap["rating"] as? Double 309 | } 310 | set { 311 | resultMap.updateValue(newValue, forKey: "rating") 312 | } 313 | } 314 | 315 | /// URLs of up to three photos of the business. 316 | public var photos: [String?]? { 317 | get { 318 | return resultMap["photos"] as? [String?] 319 | } 320 | set { 321 | resultMap.updateValue(newValue, forKey: "photos") 322 | } 323 | } 324 | 325 | /// When searching, this provides the distance of the business from the search location in meters 326 | public var distance: Double? { 327 | get { 328 | return resultMap["distance"] as? Double 329 | } 330 | set { 331 | resultMap.updateValue(newValue, forKey: "distance") 332 | } 333 | } 334 | } 335 | -------------------------------------------------------------------------------- /GraphQLSwiftUI/GraphQL/Businesses.graphql: -------------------------------------------------------------------------------- 1 | query Businesses($searchTerm: String, $latitude: Float, $longitude: Float) { 2 | search(term: $searchTerm, latitude: $latitude, longitude: $longitude) { 3 | business { 4 | ...BusinessFragment 5 | } 6 | } 7 | } 8 | 9 | fragment BusinessFragment on Business { 10 | id 11 | name 12 | url 13 | rating 14 | photos 15 | distance 16 | } 17 | -------------------------------------------------------------------------------- /GraphQLSwiftUI/GraphQL/operationIDs.json: -------------------------------------------------------------------------------- 1 | { 2 | "3d4c4624f603751075df852991d54d2bc642427f6e777128c813c923a9e248ed": { 3 | "name": "Businesses", 4 | "source": "query Businesses($searchTerm: String, $latitude: Float, $longitude: Float) {\n search(term: $searchTerm, latitude: $latitude, longitude: $longitude) {\n __typename\n business {\n __typename\n ...BusinessFragment\n }\n }\n}" 5 | } 6 | } -------------------------------------------------------------------------------- /GraphQLSwiftUI/GraphQL/schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "__schema": { 3 | "queryType": { 4 | "name": "Query" 5 | }, 6 | "mutationType": null, 7 | "subscriptionType": null, 8 | "types": [ 9 | { 10 | "kind": "OBJECT", 11 | "name": "Query", 12 | "description": null, 13 | "fields": [ 14 | { 15 | "name": "business", 16 | "description": "Load information about a specific business.", 17 | "args": [ 18 | { 19 | "name": "id", 20 | "description": "The Yelp ID for the business you want to load.", 21 | "type": { 22 | "kind": "SCALAR", 23 | "name": "String", 24 | "ofType": null 25 | }, 26 | "defaultValue": null 27 | } 28 | ], 29 | "type": { 30 | "kind": "OBJECT", 31 | "name": "Business", 32 | "ofType": null 33 | }, 34 | "isDeprecated": false, 35 | "deprecationReason": null 36 | }, 37 | { 38 | "name": "business_match", 39 | "description": "Match detailed business location data to businesses on Yelp.", 40 | "args": [ 41 | { 42 | "name": "name", 43 | "description": "Required. The name of the business. Maximum length is 64; only digits, letters, spaces, and !#$%&+,­./:?@'are allowed.", 44 | "type": { 45 | "kind": "NON_NULL", 46 | "name": null, 47 | "ofType": { 48 | "kind": "SCALAR", 49 | "name": "String", 50 | "ofType": null 51 | } 52 | }, 53 | "defaultValue": null 54 | }, 55 | { 56 | "name": "address1", 57 | "description": "Required. The first line of the business’s address. Maximum length is 64;\nonly digits, letters, spaces, and ­’/#&,.: are allowed. Note that the empty\nstring is allowed; this will specifically match certain service businesses\nthat have no street address.", 58 | "type": { 59 | "kind": "NON_NULL", 60 | "name": null, 61 | "ofType": { 62 | "kind": "SCALAR", 63 | "name": "String", 64 | "ofType": null 65 | } 66 | }, 67 | "defaultValue": null 68 | }, 69 | { 70 | "name": "address2", 71 | "description": "Optional. The second line of the business’s address. Maximum length is 64;\nonly digits, letters, spaces, and ­’/#&,.: are allowed.", 72 | "type": { 73 | "kind": "SCALAR", 74 | "name": "String", 75 | "ofType": null 76 | }, 77 | "defaultValue": null 78 | }, 79 | { 80 | "name": "address3", 81 | "description": "Optional. The third line of the business’s address. Maximum length is 64;\nonly digits, letters, spaces, and ­’/#&,.: are allowed.", 82 | "type": { 83 | "kind": "SCALAR", 84 | "name": "String", 85 | "ofType": null 86 | }, 87 | "defaultValue": null 88 | }, 89 | { 90 | "name": "city", 91 | "description": "Required. The city of the business. Maximum length is 64; only digits, letters, spaces, and ­’.() are allowed.", 92 | "type": { 93 | "kind": "NON_NULL", 94 | "name": null, 95 | "ofType": { 96 | "kind": "SCALAR", 97 | "name": "String", 98 | "ofType": null 99 | } 100 | }, 101 | "defaultValue": null 102 | }, 103 | { 104 | "name": "state", 105 | "description": "Required. The ISO 3166­-2 code for the region/province of the business. Maximum length is 3.", 106 | "type": { 107 | "kind": "NON_NULL", 108 | "name": null, 109 | "ofType": { 110 | "kind": "SCALAR", 111 | "name": "String", 112 | "ofType": null 113 | } 114 | }, 115 | "defaultValue": null 116 | }, 117 | { 118 | "name": "country", 119 | "description": "Required. The ISO 3166­-1 alpha­2 country code of the business. Maximum length is 2.", 120 | "type": { 121 | "kind": "NON_NULL", 122 | "name": null, 123 | "ofType": { 124 | "kind": "SCALAR", 125 | "name": "String", 126 | "ofType": null 127 | } 128 | }, 129 | "defaultValue": null 130 | }, 131 | { 132 | "name": "latitude", 133 | "description": "Optional. The WGS84 latitude of the business in decimal degrees. Must be between ­-90 and +90.", 134 | "type": { 135 | "kind": "SCALAR", 136 | "name": "Float", 137 | "ofType": null 138 | }, 139 | "defaultValue": null 140 | }, 141 | { 142 | "name": "longitude", 143 | "description": "Optional. The WGS84 longitude of the business in decimal degrees. Must be between ­-180 and +180.", 144 | "type": { 145 | "kind": "SCALAR", 146 | "name": "Float", 147 | "ofType": null 148 | }, 149 | "defaultValue": null 150 | }, 151 | { 152 | "name": "phone", 153 | "description": "Optional. The phone number of the business which can be submitted as (a)\nlocally ­formatted with digits only (e.g., 016703080) or (b)\ninternationally­ formatted with a leading + sign and digits only after\n(+35316703080). Maximum length is 32.", 154 | "type": { 155 | "kind": "SCALAR", 156 | "name": "String", 157 | "ofType": null 158 | }, 159 | "defaultValue": null 160 | }, 161 | { 162 | "name": "postal_code", 163 | "description": "Optional. The postal code of the business. Maximum length is 12.", 164 | "type": { 165 | "kind": "SCALAR", 166 | "name": "String", 167 | "ofType": null 168 | }, 169 | "defaultValue": null 170 | }, 171 | { 172 | "name": "limit", 173 | "description": "Optional. The maximum number of businesses to return.", 174 | "type": { 175 | "kind": "SCALAR", 176 | "name": "Int", 177 | "ofType": null 178 | }, 179 | "defaultValue": "3" 180 | }, 181 | { 182 | "name": "match_threshold", 183 | "description": "Optional. A match quality threshold that will determine how closely\nbusinesses must match the input to be returned. Defaults to DEFAULT.", 184 | "type": { 185 | "kind": "ENUM", 186 | "name": "MatchThreshold", 187 | "ofType": null 188 | }, 189 | "defaultValue": null 190 | } 191 | ], 192 | "type": { 193 | "kind": "OBJECT", 194 | "name": "Businesses", 195 | "ofType": null 196 | }, 197 | "isDeprecated": false, 198 | "deprecationReason": null 199 | }, 200 | { 201 | "name": "reviews", 202 | "description": "Load reviews for a specific business.", 203 | "args": [ 204 | { 205 | "name": "business", 206 | "description": "The Yelp ID for the business you want to load.", 207 | "type": { 208 | "kind": "SCALAR", 209 | "name": "String", 210 | "ofType": null 211 | }, 212 | "defaultValue": null 213 | }, 214 | { 215 | "name": "locale", 216 | "description": "Output locale. Show reviews in the same language. See the list of supported locales.", 217 | "type": { 218 | "kind": "SCALAR", 219 | "name": "String", 220 | "ofType": null 221 | }, 222 | "defaultValue": null 223 | }, 224 | { 225 | "name": "limit", 226 | "description": null, 227 | "type": { 228 | "kind": "SCALAR", 229 | "name": "Int", 230 | "ofType": null 231 | }, 232 | "defaultValue": null 233 | }, 234 | { 235 | "name": "offset", 236 | "description": null, 237 | "type": { 238 | "kind": "SCALAR", 239 | "name": "Int", 240 | "ofType": null 241 | }, 242 | "defaultValue": null 243 | } 244 | ], 245 | "type": { 246 | "kind": "OBJECT", 247 | "name": "Reviews", 248 | "ofType": null 249 | }, 250 | "isDeprecated": false, 251 | "deprecationReason": null 252 | }, 253 | { 254 | "name": "phone_search", 255 | "description": "Search for businesses on Yelp by their phone number.", 256 | "args": [ 257 | { 258 | "name": "phone", 259 | "description": "Required. Phone number of the business you want to search for. It must start\nwith + and include the country code, like +14159083801.", 260 | "type": { 261 | "kind": "SCALAR", 262 | "name": "String", 263 | "ofType": null 264 | }, 265 | "defaultValue": null 266 | } 267 | ], 268 | "type": { 269 | "kind": "OBJECT", 270 | "name": "Businesses", 271 | "ofType": null 272 | }, 273 | "isDeprecated": false, 274 | "deprecationReason": null 275 | }, 276 | { 277 | "name": "search", 278 | "description": "Search for businesses on Yelp.", 279 | "args": [ 280 | { 281 | "name": "term", 282 | "description": "Optional. Search term (e.g. \"food\", \"restaurants\"). If term isn't included\nwe search everything. The term keyword also accepts business names such as \"Starbucks\".", 283 | "type": { 284 | "kind": "SCALAR", 285 | "name": "String", 286 | "ofType": null 287 | }, 288 | "defaultValue": null 289 | }, 290 | { 291 | "name": "location", 292 | "description": "Required. Specifies the combination of \"address, neighborhood, city, state\nor zip, optional country\" to be used when searching for businesses.", 293 | "type": { 294 | "kind": "SCALAR", 295 | "name": "String", 296 | "ofType": null 297 | }, 298 | "defaultValue": null 299 | }, 300 | { 301 | "name": "country", 302 | "description": null, 303 | "type": { 304 | "kind": "SCALAR", 305 | "name": "String", 306 | "ofType": null 307 | }, 308 | "defaultValue": null 309 | }, 310 | { 311 | "name": "offset", 312 | "description": "Optional. Offset the list of returned business results by this amount.", 313 | "type": { 314 | "kind": "SCALAR", 315 | "name": "Int", 316 | "ofType": null 317 | }, 318 | "defaultValue": null 319 | }, 320 | { 321 | "name": "limit", 322 | "description": "Optional. Number of business results to return. By default, it will return 20. Maximum is 50.", 323 | "type": { 324 | "kind": "SCALAR", 325 | "name": "Int", 326 | "ofType": null 327 | }, 328 | "defaultValue": null 329 | }, 330 | { 331 | "name": "sort_by", 332 | "description": "Sort the results by one of the these modes: best_match, rating, review_count\nor distance. By default it's best_match. The rating sort is not strictly\nsorted by the rating value, but by an adjusted rating value that takes into\naccount the number of ratings, similar to a Bayesian average. This is so a\nbusiness with 1 rating of 5 stars doesn't immediately jump to the top.", 333 | "type": { 334 | "kind": "SCALAR", 335 | "name": "String", 336 | "ofType": null 337 | }, 338 | "defaultValue": null 339 | }, 340 | { 341 | "name": "locale", 342 | "description": "Optional. Specify the locale to return the event information in. See the list of supported locales.", 343 | "type": { 344 | "kind": "SCALAR", 345 | "name": "String", 346 | "ofType": null 347 | }, 348 | "defaultValue": null 349 | }, 350 | { 351 | "name": "longitude", 352 | "description": "Required if location is not provided. Longitude of the location you want to search nearby.", 353 | "type": { 354 | "kind": "SCALAR", 355 | "name": "Float", 356 | "ofType": null 357 | }, 358 | "defaultValue": null 359 | }, 360 | { 361 | "name": "latitude", 362 | "description": "Required if location is not provided. Latitude of the location you want to search nearby.", 363 | "type": { 364 | "kind": "SCALAR", 365 | "name": "Float", 366 | "ofType": null 367 | }, 368 | "defaultValue": null 369 | }, 370 | { 371 | "name": "categories", 372 | "description": "Optional. Categories to filter the search results with. See the list of\nsupported categories. The category filter can be a list of comma delimited\ncategories. For example, \"bars,french\" will filter by Bars OR French. The\ncategory identifier should be used (for example \"discgolf\", not \"Disc Golf\").", 373 | "type": { 374 | "kind": "SCALAR", 375 | "name": "String", 376 | "ofType": null 377 | }, 378 | "defaultValue": null 379 | }, 380 | { 381 | "name": "open_now", 382 | "description": "Optional. Default to false. When set to true, only return the businesses\nopen now. Notice that open_at and open_now cannot be used together.", 383 | "type": { 384 | "kind": "SCALAR", 385 | "name": "Boolean", 386 | "ofType": null 387 | }, 388 | "defaultValue": null 389 | }, 390 | { 391 | "name": "open_at", 392 | "description": "Optional. An integer representing the Unix time in the same timezone of the\nsearch location. If specified, it will return business open at the given\ntime. Notice that open_at and open_now cannot be used together.", 393 | "type": { 394 | "kind": "SCALAR", 395 | "name": "Int", 396 | "ofType": null 397 | }, 398 | "defaultValue": null 399 | }, 400 | { 401 | "name": "price", 402 | "description": "Optional. Pricing levels to filter the search result with: 1 = $, 2 = $$, 3\n= $$$, 4 = $$$$. The price filter can be a list of comma delimited pricing\nlevels. For example, \"1, 2, 3\" will filter the results to show the ones that\nare $, $$, or $$$.", 403 | "type": { 404 | "kind": "SCALAR", 405 | "name": "String", 406 | "ofType": null 407 | }, 408 | "defaultValue": null 409 | }, 410 | { 411 | "name": "attributes", 412 | "description": "Additional filters to restrict search results.", 413 | "type": { 414 | "kind": "LIST", 415 | "name": null, 416 | "ofType": { 417 | "kind": "SCALAR", 418 | "name": "String", 419 | "ofType": null 420 | } 421 | }, 422 | "defaultValue": null 423 | }, 424 | { 425 | "name": "radius", 426 | "description": "Optional. Search radius in meters. If the value is too large, a\nAREA_TOO_LARGE error may be returned. The max value is 40000 meters (25 miles).", 427 | "type": { 428 | "kind": "SCALAR", 429 | "name": "Float", 430 | "ofType": null 431 | }, 432 | "defaultValue": null 433 | } 434 | ], 435 | "type": { 436 | "kind": "OBJECT", 437 | "name": "Businesses", 438 | "ofType": null 439 | }, 440 | "isDeprecated": false, 441 | "deprecationReason": null 442 | }, 443 | { 444 | "name": "event", 445 | "description": "Load information about a specific event.", 446 | "args": [ 447 | { 448 | "name": "id", 449 | "description": "The Yelp ID for the event you want to load.", 450 | "type": { 451 | "kind": "SCALAR", 452 | "name": "String", 453 | "ofType": null 454 | }, 455 | "defaultValue": null 456 | } 457 | ], 458 | "type": { 459 | "kind": "OBJECT", 460 | "name": "Event", 461 | "ofType": null 462 | }, 463 | "isDeprecated": false, 464 | "deprecationReason": null 465 | }, 466 | { 467 | "name": "event_search", 468 | "description": "Search for events based on search parameters.", 469 | "args": [ 470 | { 471 | "name": "locale", 472 | "description": "Optional. Specify the locale to return the event information in. See the list of supported locales.", 473 | "type": { 474 | "kind": "SCALAR", 475 | "name": "String", 476 | "ofType": null 477 | }, 478 | "defaultValue": null 479 | }, 480 | { 481 | "name": "offset", 482 | "description": "Optional. Offset the list of returned events results by this amount.", 483 | "type": { 484 | "kind": "SCALAR", 485 | "name": "Int", 486 | "ofType": null 487 | }, 488 | "defaultValue": null 489 | }, 490 | { 491 | "name": "limit", 492 | "description": "Optional. Number of events results to return. By default, it will return 3. Maximum is 50.", 493 | "type": { 494 | "kind": "SCALAR", 495 | "name": "Int", 496 | "ofType": null 497 | }, 498 | "defaultValue": null 499 | }, 500 | { 501 | "name": "sort_by", 502 | "description": "Optional. Sort by either descending or ascending order. By default, it returns results in descending order.", 503 | "type": { 504 | "kind": "SCALAR", 505 | "name": "String", 506 | "ofType": null 507 | }, 508 | "defaultValue": null 509 | }, 510 | { 511 | "name": "sort_on", 512 | "description": "Optional. Sort on popularity or time start. By default, sorts on popularity.", 513 | "type": { 514 | "kind": "SCALAR", 515 | "name": "String", 516 | "ofType": null 517 | }, 518 | "defaultValue": null 519 | }, 520 | { 521 | "name": "start_date", 522 | "description": "Optional. Unix timestamp of the event start time. Will return events that only begin at or after the specified time.", 523 | "type": { 524 | "kind": "SCALAR", 525 | "name": "Int", 526 | "ofType": null 527 | }, 528 | "defaultValue": null 529 | }, 530 | { 531 | "name": "end_date", 532 | "description": "Optional. Unix timestamp of the event end time. Will return events that only end at or before the specified time.", 533 | "type": { 534 | "kind": "SCALAR", 535 | "name": "Int", 536 | "ofType": null 537 | }, 538 | "defaultValue": null 539 | }, 540 | { 541 | "name": "categories", 542 | "description": "Optional. The category filter can be a list of comma delimited categories to\nget OR'd results that include the categories provided. See the list of categories.", 543 | "type": { 544 | "kind": "LIST", 545 | "name": null, 546 | "ofType": { 547 | "kind": "SCALAR", 548 | "name": "String", 549 | "ofType": null 550 | } 551 | }, 552 | "defaultValue": null 553 | }, 554 | { 555 | "name": "is_free", 556 | "description": "Optional. Filter whether the events are free to attend. By default no filter\nis applied so both free and paid events will be returned.", 557 | "type": { 558 | "kind": "SCALAR", 559 | "name": "Boolean", 560 | "ofType": null 561 | }, 562 | "defaultValue": null 563 | }, 564 | { 565 | "name": "location", 566 | "description": "Optional. Specifies the combination of \"address, neighborhood, city, state\nor zip, optional country\" to be used when searching for events.", 567 | "type": { 568 | "kind": "SCALAR", 569 | "name": "String", 570 | "ofType": null 571 | }, 572 | "defaultValue": null 573 | }, 574 | { 575 | "name": "latitude", 576 | "description": "Optional. Latitude of the location you want to search nearby. If latitude is provided, longitude is required too.", 577 | "type": { 578 | "kind": "SCALAR", 579 | "name": "Float", 580 | "ofType": null 581 | }, 582 | "defaultValue": null 583 | }, 584 | { 585 | "name": "longitude", 586 | "description": "Optional. Longitude of the location you want to search nearby. If longitude is provided, latitude is required too.", 587 | "type": { 588 | "kind": "SCALAR", 589 | "name": "Float", 590 | "ofType": null 591 | }, 592 | "defaultValue": null 593 | }, 594 | { 595 | "name": "radius", 596 | "description": "Optional. Search radius in meters. If the value is too large, a\nAREA_TOO_LARGE error may be returned. The max value is 40000 meters (25 miles).", 597 | "type": { 598 | "kind": "SCALAR", 599 | "name": "Float", 600 | "ofType": null 601 | }, 602 | "defaultValue": null 603 | } 604 | ], 605 | "type": { 606 | "kind": "OBJECT", 607 | "name": "Events", 608 | "ofType": null 609 | }, 610 | "isDeprecated": false, 611 | "deprecationReason": null 612 | }, 613 | { 614 | "name": "categories", 615 | "description": null, 616 | "args": [ 617 | { 618 | "name": "alias", 619 | "description": "Optional. Alias of the category to search for. If alias is provided, up to one result will be returned.", 620 | "type": { 621 | "kind": "SCALAR", 622 | "name": "String", 623 | "ofType": null 624 | }, 625 | "defaultValue": null 626 | }, 627 | { 628 | "name": "country", 629 | "description": "Optional. Country code used to filter categories available in a given country.", 630 | "type": { 631 | "kind": "SCALAR", 632 | "name": "String", 633 | "ofType": null 634 | }, 635 | "defaultValue": null 636 | }, 637 | { 638 | "name": "locale", 639 | "description": "Optional. Locale used to localize the title of the category. By default, this is set to en_US.", 640 | "type": { 641 | "kind": "SCALAR", 642 | "name": "String", 643 | "ofType": null 644 | }, 645 | "defaultValue": "\"en_US\"" 646 | } 647 | ], 648 | "type": { 649 | "kind": "OBJECT", 650 | "name": "Categories", 651 | "ofType": null 652 | }, 653 | "isDeprecated": false, 654 | "deprecationReason": null 655 | } 656 | ], 657 | "inputFields": null, 658 | "interfaces": [], 659 | "enumValues": null, 660 | "possibleTypes": null 661 | }, 662 | { 663 | "kind": "SCALAR", 664 | "name": "String", 665 | "description": "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.", 666 | "fields": null, 667 | "inputFields": null, 668 | "interfaces": null, 669 | "enumValues": null, 670 | "possibleTypes": null 671 | }, 672 | { 673 | "kind": "OBJECT", 674 | "name": "Business", 675 | "description": null, 676 | "fields": [ 677 | { 678 | "name": "name", 679 | "description": "Name of this business.", 680 | "args": [], 681 | "type": { 682 | "kind": "SCALAR", 683 | "name": "String", 684 | "ofType": null 685 | }, 686 | "isDeprecated": false, 687 | "deprecationReason": null 688 | }, 689 | { 690 | "name": "id", 691 | "description": "Yelp ID of this business.", 692 | "args": [], 693 | "type": { 694 | "kind": "SCALAR", 695 | "name": "String", 696 | "ofType": null 697 | }, 698 | "isDeprecated": false, 699 | "deprecationReason": null 700 | }, 701 | { 702 | "name": "alias", 703 | "description": "Yelp alias of this business.", 704 | "args": [], 705 | "type": { 706 | "kind": "SCALAR", 707 | "name": "String", 708 | "ofType": null 709 | }, 710 | "isDeprecated": false, 711 | "deprecationReason": null 712 | }, 713 | { 714 | "name": "is_claimed", 715 | "description": "Whether business has been claimed by a business owner.", 716 | "args": [], 717 | "type": { 718 | "kind": "SCALAR", 719 | "name": "Boolean", 720 | "ofType": null 721 | }, 722 | "isDeprecated": false, 723 | "deprecationReason": null 724 | }, 725 | { 726 | "name": "is_closed", 727 | "description": "Whether business has been (permanently) closed.", 728 | "args": [], 729 | "type": { 730 | "kind": "SCALAR", 731 | "name": "Boolean", 732 | "ofType": null 733 | }, 734 | "isDeprecated": false, 735 | "deprecationReason": null 736 | }, 737 | { 738 | "name": "url", 739 | "description": "URL for business page on Yelp.", 740 | "args": [], 741 | "type": { 742 | "kind": "SCALAR", 743 | "name": "String", 744 | "ofType": null 745 | }, 746 | "isDeprecated": false, 747 | "deprecationReason": null 748 | }, 749 | { 750 | "name": "phone", 751 | "description": "Phone number of the business.", 752 | "args": [], 753 | "type": { 754 | "kind": "SCALAR", 755 | "name": "String", 756 | "ofType": null 757 | }, 758 | "isDeprecated": false, 759 | "deprecationReason": null 760 | }, 761 | { 762 | "name": "display_phone", 763 | "description": "Phone number of the business formatted nicely to be displayed to users. The\nformat is the standard phone number format for the business's country.", 764 | "args": [], 765 | "type": { 766 | "kind": "SCALAR", 767 | "name": "String", 768 | "ofType": null 769 | }, 770 | "isDeprecated": false, 771 | "deprecationReason": null 772 | }, 773 | { 774 | "name": "review_count", 775 | "description": "Number of reviews for this business.", 776 | "args": [], 777 | "type": { 778 | "kind": "SCALAR", 779 | "name": "Int", 780 | "ofType": null 781 | }, 782 | "isDeprecated": false, 783 | "deprecationReason": null 784 | }, 785 | { 786 | "name": "categories", 787 | "description": "A list of category title and alias pairs associated with this business.", 788 | "args": [], 789 | "type": { 790 | "kind": "LIST", 791 | "name": null, 792 | "ofType": { 793 | "kind": "OBJECT", 794 | "name": "Category", 795 | "ofType": null 796 | } 797 | }, 798 | "isDeprecated": false, 799 | "deprecationReason": null 800 | }, 801 | { 802 | "name": "rating", 803 | "description": "Rating for this business (value ranges from 1, 1.5, ... 4.5, 5).", 804 | "args": [], 805 | "type": { 806 | "kind": "SCALAR", 807 | "name": "Float", 808 | "ofType": null 809 | }, 810 | "isDeprecated": false, 811 | "deprecationReason": null 812 | }, 813 | { 814 | "name": "price", 815 | "description": "Price level of the business. Value is one of $, $$, $$$ and $$$$ or null if we\ndon't have price available for the business.", 816 | "args": [], 817 | "type": { 818 | "kind": "SCALAR", 819 | "name": "String", 820 | "ofType": null 821 | }, 822 | "isDeprecated": false, 823 | "deprecationReason": null 824 | }, 825 | { 826 | "name": "location", 827 | "description": "The location of this business, including address, city, state, postal code and country.", 828 | "args": [], 829 | "type": { 830 | "kind": "OBJECT", 831 | "name": "Location", 832 | "ofType": null 833 | }, 834 | "isDeprecated": false, 835 | "deprecationReason": null 836 | }, 837 | { 838 | "name": "coordinates", 839 | "description": "The coordinates of this business.", 840 | "args": [], 841 | "type": { 842 | "kind": "OBJECT", 843 | "name": "Coordinates", 844 | "ofType": null 845 | }, 846 | "isDeprecated": false, 847 | "deprecationReason": null 848 | }, 849 | { 850 | "name": "photos", 851 | "description": "URLs of up to three photos of the business.", 852 | "args": [], 853 | "type": { 854 | "kind": "LIST", 855 | "name": null, 856 | "ofType": { 857 | "kind": "SCALAR", 858 | "name": "String", 859 | "ofType": null 860 | } 861 | }, 862 | "isDeprecated": false, 863 | "deprecationReason": null 864 | }, 865 | { 866 | "name": "hours", 867 | "description": "Opening hours of the business.", 868 | "args": [], 869 | "type": { 870 | "kind": "LIST", 871 | "name": null, 872 | "ofType": { 873 | "kind": "OBJECT", 874 | "name": "Hours", 875 | "ofType": null 876 | } 877 | }, 878 | "isDeprecated": false, 879 | "deprecationReason": null 880 | }, 881 | { 882 | "name": "special_hours", 883 | "description": "Special hours of the business, these override regular opening hours of the business.", 884 | "args": [], 885 | "type": { 886 | "kind": "LIST", 887 | "name": null, 888 | "ofType": { 889 | "kind": "OBJECT", 890 | "name": "SpecialHours", 891 | "ofType": null 892 | } 893 | }, 894 | "isDeprecated": false, 895 | "deprecationReason": null 896 | }, 897 | { 898 | "name": "reviews", 899 | "description": "Review snippets from the business.", 900 | "args": [ 901 | { 902 | "name": "limit", 903 | "description": null, 904 | "type": { 905 | "kind": "SCALAR", 906 | "name": "Int", 907 | "ofType": null 908 | }, 909 | "defaultValue": null 910 | }, 911 | { 912 | "name": "offset", 913 | "description": null, 914 | "type": { 915 | "kind": "SCALAR", 916 | "name": "Int", 917 | "ofType": null 918 | }, 919 | "defaultValue": null 920 | } 921 | ], 922 | "type": { 923 | "kind": "LIST", 924 | "name": null, 925 | "ofType": { 926 | "kind": "OBJECT", 927 | "name": "Review", 928 | "ofType": null 929 | } 930 | }, 931 | "isDeprecated": false, 932 | "deprecationReason": null 933 | }, 934 | { 935 | "name": "distance", 936 | "description": "When searching, this provides the distance of the business from the search location in meters", 937 | "args": [], 938 | "type": { 939 | "kind": "SCALAR", 940 | "name": "Float", 941 | "ofType": null 942 | }, 943 | "isDeprecated": false, 944 | "deprecationReason": null 945 | }, 946 | { 947 | "name": "attributes", 948 | "description": "Business attributes.", 949 | "args": [], 950 | "type": { 951 | "kind": "OBJECT", 952 | "name": "BusinessAttributes", 953 | "ofType": null 954 | }, 955 | "isDeprecated": false, 956 | "deprecationReason": null 957 | }, 958 | { 959 | "name": "transactions", 960 | "description": "Information and action links for transacting with this business online.", 961 | "args": [], 962 | "type": { 963 | "kind": "OBJECT", 964 | "name": "Transactions", 965 | "ofType": null 966 | }, 967 | "isDeprecated": false, 968 | "deprecationReason": null 969 | }, 970 | { 971 | "name": "messaging", 972 | "description": "Information and action links for messaging with this business via Yelp, including requesting quotes.", 973 | "args": [], 974 | "type": { 975 | "kind": "OBJECT", 976 | "name": "BusinessMessaging", 977 | "ofType": null 978 | }, 979 | "isDeprecated": false, 980 | "deprecationReason": null 981 | } 982 | ], 983 | "inputFields": null, 984 | "interfaces": [], 985 | "enumValues": null, 986 | "possibleTypes": null 987 | }, 988 | { 989 | "kind": "SCALAR", 990 | "name": "Boolean", 991 | "description": "The `Boolean` scalar type represents `true` or `false`.", 992 | "fields": null, 993 | "inputFields": null, 994 | "interfaces": null, 995 | "enumValues": null, 996 | "possibleTypes": null 997 | }, 998 | { 999 | "kind": "SCALAR", 1000 | "name": "Int", 1001 | "description": "The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.", 1002 | "fields": null, 1003 | "inputFields": null, 1004 | "interfaces": null, 1005 | "enumValues": null, 1006 | "possibleTypes": null 1007 | }, 1008 | { 1009 | "kind": "OBJECT", 1010 | "name": "Category", 1011 | "description": null, 1012 | "fields": [ 1013 | { 1014 | "name": "title", 1015 | "description": "Title of a category for display purposes.", 1016 | "args": [], 1017 | "type": { 1018 | "kind": "SCALAR", 1019 | "name": "String", 1020 | "ofType": null 1021 | }, 1022 | "isDeprecated": false, 1023 | "deprecationReason": null 1024 | }, 1025 | { 1026 | "name": "alias", 1027 | "description": "Alias of a category, when searching for business in certain categories, use alias rather than the title.", 1028 | "args": [], 1029 | "type": { 1030 | "kind": "SCALAR", 1031 | "name": "String", 1032 | "ofType": null 1033 | }, 1034 | "isDeprecated": false, 1035 | "deprecationReason": null 1036 | }, 1037 | { 1038 | "name": "parent_categories", 1039 | "description": "List of parent categories.", 1040 | "args": [], 1041 | "type": { 1042 | "kind": "LIST", 1043 | "name": null, 1044 | "ofType": { 1045 | "kind": "OBJECT", 1046 | "name": "Category", 1047 | "ofType": null 1048 | } 1049 | }, 1050 | "isDeprecated": false, 1051 | "deprecationReason": null 1052 | }, 1053 | { 1054 | "name": "country_whitelist", 1055 | "description": "Countries for which this category is whitelisted.", 1056 | "args": [], 1057 | "type": { 1058 | "kind": "LIST", 1059 | "name": null, 1060 | "ofType": { 1061 | "kind": "OBJECT", 1062 | "name": "Country", 1063 | "ofType": null 1064 | } 1065 | }, 1066 | "isDeprecated": false, 1067 | "deprecationReason": null 1068 | }, 1069 | { 1070 | "name": "country_blacklist", 1071 | "description": "Countries for which this category is blacklisted.", 1072 | "args": [], 1073 | "type": { 1074 | "kind": "LIST", 1075 | "name": null, 1076 | "ofType": { 1077 | "kind": "OBJECT", 1078 | "name": "Country", 1079 | "ofType": null 1080 | } 1081 | }, 1082 | "isDeprecated": false, 1083 | "deprecationReason": null 1084 | } 1085 | ], 1086 | "inputFields": null, 1087 | "interfaces": [], 1088 | "enumValues": null, 1089 | "possibleTypes": null 1090 | }, 1091 | { 1092 | "kind": "OBJECT", 1093 | "name": "Country", 1094 | "description": null, 1095 | "fields": [ 1096 | { 1097 | "name": "code", 1098 | "description": "The ISO 3166-1 alpha-2 code for this country.", 1099 | "args": [], 1100 | "type": { 1101 | "kind": "SCALAR", 1102 | "name": "String", 1103 | "ofType": null 1104 | }, 1105 | "isDeprecated": false, 1106 | "deprecationReason": null 1107 | }, 1108 | { 1109 | "name": "locales", 1110 | "description": "Supported locales with this country.", 1111 | "args": [], 1112 | "type": { 1113 | "kind": "LIST", 1114 | "name": null, 1115 | "ofType": { 1116 | "kind": "OBJECT", 1117 | "name": "Locale", 1118 | "ofType": null 1119 | } 1120 | }, 1121 | "isDeprecated": false, 1122 | "deprecationReason": null 1123 | } 1124 | ], 1125 | "inputFields": null, 1126 | "interfaces": [], 1127 | "enumValues": null, 1128 | "possibleTypes": null 1129 | }, 1130 | { 1131 | "kind": "OBJECT", 1132 | "name": "Locale", 1133 | "description": null, 1134 | "fields": [ 1135 | { 1136 | "name": "code", 1137 | "description": "The code for this locale, in the format of {language_code}_{country_code}.", 1138 | "args": [], 1139 | "type": { 1140 | "kind": "SCALAR", 1141 | "name": "String", 1142 | "ofType": null 1143 | }, 1144 | "isDeprecated": false, 1145 | "deprecationReason": null 1146 | }, 1147 | { 1148 | "name": "language", 1149 | "description": "The language component of this locale.", 1150 | "args": [], 1151 | "type": { 1152 | "kind": "OBJECT", 1153 | "name": "Language", 1154 | "ofType": null 1155 | }, 1156 | "isDeprecated": false, 1157 | "deprecationReason": null 1158 | }, 1159 | { 1160 | "name": "country", 1161 | "description": "The country component of this locale.", 1162 | "args": [], 1163 | "type": { 1164 | "kind": "OBJECT", 1165 | "name": "Country", 1166 | "ofType": null 1167 | }, 1168 | "isDeprecated": false, 1169 | "deprecationReason": null 1170 | } 1171 | ], 1172 | "inputFields": null, 1173 | "interfaces": [], 1174 | "enumValues": null, 1175 | "possibleTypes": null 1176 | }, 1177 | { 1178 | "kind": "OBJECT", 1179 | "name": "Language", 1180 | "description": null, 1181 | "fields": [ 1182 | { 1183 | "name": "code", 1184 | "description": "The ISO 639-1 alpha-2 code for this language. When such a code is unavailable\nfor a language, it will be a ISO 639-2 alpha-3 code instead.", 1185 | "args": [], 1186 | "type": { 1187 | "kind": "SCALAR", 1188 | "name": "String", 1189 | "ofType": null 1190 | }, 1191 | "isDeprecated": false, 1192 | "deprecationReason": null 1193 | }, 1194 | { 1195 | "name": "locales", 1196 | "description": "Supported locales with this language.", 1197 | "args": [], 1198 | "type": { 1199 | "kind": "LIST", 1200 | "name": null, 1201 | "ofType": { 1202 | "kind": "OBJECT", 1203 | "name": "Locale", 1204 | "ofType": null 1205 | } 1206 | }, 1207 | "isDeprecated": false, 1208 | "deprecationReason": null 1209 | } 1210 | ], 1211 | "inputFields": null, 1212 | "interfaces": [], 1213 | "enumValues": null, 1214 | "possibleTypes": null 1215 | }, 1216 | { 1217 | "kind": "SCALAR", 1218 | "name": "Float", 1219 | "description": "The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).", 1220 | "fields": null, 1221 | "inputFields": null, 1222 | "interfaces": null, 1223 | "enumValues": null, 1224 | "possibleTypes": null 1225 | }, 1226 | { 1227 | "kind": "OBJECT", 1228 | "name": "Location", 1229 | "description": null, 1230 | "fields": [ 1231 | { 1232 | "name": "address1", 1233 | "description": "Street address of this business.", 1234 | "args": [], 1235 | "type": { 1236 | "kind": "SCALAR", 1237 | "name": "String", 1238 | "ofType": null 1239 | }, 1240 | "isDeprecated": false, 1241 | "deprecationReason": null 1242 | }, 1243 | { 1244 | "name": "address2", 1245 | "description": "Street address of this business, continued.", 1246 | "args": [], 1247 | "type": { 1248 | "kind": "SCALAR", 1249 | "name": "String", 1250 | "ofType": null 1251 | }, 1252 | "isDeprecated": false, 1253 | "deprecationReason": null 1254 | }, 1255 | { 1256 | "name": "address3", 1257 | "description": "Street address of this business, continued.", 1258 | "args": [], 1259 | "type": { 1260 | "kind": "SCALAR", 1261 | "name": "String", 1262 | "ofType": null 1263 | }, 1264 | "isDeprecated": false, 1265 | "deprecationReason": null 1266 | }, 1267 | { 1268 | "name": "city", 1269 | "description": "City of this business.", 1270 | "args": [], 1271 | "type": { 1272 | "kind": "SCALAR", 1273 | "name": "String", 1274 | "ofType": null 1275 | }, 1276 | "isDeprecated": false, 1277 | "deprecationReason": null 1278 | }, 1279 | { 1280 | "name": "state", 1281 | "description": "ISO 3166-2 (with a few exceptions) state code of this business.", 1282 | "args": [], 1283 | "type": { 1284 | "kind": "SCALAR", 1285 | "name": "String", 1286 | "ofType": null 1287 | }, 1288 | "isDeprecated": false, 1289 | "deprecationReason": null 1290 | }, 1291 | { 1292 | "name": "postal_code", 1293 | "description": "Postal code of this business.", 1294 | "args": [], 1295 | "type": { 1296 | "kind": "SCALAR", 1297 | "name": "String", 1298 | "ofType": null 1299 | }, 1300 | "isDeprecated": false, 1301 | "deprecationReason": null 1302 | }, 1303 | { 1304 | "name": "country", 1305 | "description": "ISO 3166-1 alpha-2 country code of this business.", 1306 | "args": [], 1307 | "type": { 1308 | "kind": "SCALAR", 1309 | "name": "String", 1310 | "ofType": null 1311 | }, 1312 | "isDeprecated": false, 1313 | "deprecationReason": null 1314 | }, 1315 | { 1316 | "name": "formatted_address", 1317 | "description": "Array of strings that if organized vertically give an address that is in the\nstandard address format for the business's country.", 1318 | "args": [], 1319 | "type": { 1320 | "kind": "SCALAR", 1321 | "name": "String", 1322 | "ofType": null 1323 | }, 1324 | "isDeprecated": false, 1325 | "deprecationReason": null 1326 | } 1327 | ], 1328 | "inputFields": null, 1329 | "interfaces": [], 1330 | "enumValues": null, 1331 | "possibleTypes": null 1332 | }, 1333 | { 1334 | "kind": "OBJECT", 1335 | "name": "Coordinates", 1336 | "description": null, 1337 | "fields": [ 1338 | { 1339 | "name": "latitude", 1340 | "description": "The latitude of this business.", 1341 | "args": [], 1342 | "type": { 1343 | "kind": "SCALAR", 1344 | "name": "Float", 1345 | "ofType": null 1346 | }, 1347 | "isDeprecated": false, 1348 | "deprecationReason": null 1349 | }, 1350 | { 1351 | "name": "longitude", 1352 | "description": "The longitude of this business.", 1353 | "args": [], 1354 | "type": { 1355 | "kind": "SCALAR", 1356 | "name": "Float", 1357 | "ofType": null 1358 | }, 1359 | "isDeprecated": false, 1360 | "deprecationReason": null 1361 | } 1362 | ], 1363 | "inputFields": null, 1364 | "interfaces": [], 1365 | "enumValues": null, 1366 | "possibleTypes": null 1367 | }, 1368 | { 1369 | "kind": "OBJECT", 1370 | "name": "Hours", 1371 | "description": null, 1372 | "fields": [ 1373 | { 1374 | "name": "hours_type", 1375 | "description": "The type of the opening hours information. Right now, this is always REGULAR.", 1376 | "args": [], 1377 | "type": { 1378 | "kind": "SCALAR", 1379 | "name": "String", 1380 | "ofType": null 1381 | }, 1382 | "isDeprecated": false, 1383 | "deprecationReason": null 1384 | }, 1385 | { 1386 | "name": "open", 1387 | "description": "The specific open hours and days for a business.", 1388 | "args": [], 1389 | "type": { 1390 | "kind": "LIST", 1391 | "name": null, 1392 | "ofType": { 1393 | "kind": "OBJECT", 1394 | "name": "OpenHours", 1395 | "ofType": null 1396 | } 1397 | }, 1398 | "isDeprecated": false, 1399 | "deprecationReason": null 1400 | }, 1401 | { 1402 | "name": "is_open_now", 1403 | "description": "Describes if the business is open now.", 1404 | "args": [], 1405 | "type": { 1406 | "kind": "SCALAR", 1407 | "name": "Boolean", 1408 | "ofType": null 1409 | }, 1410 | "isDeprecated": false, 1411 | "deprecationReason": null 1412 | } 1413 | ], 1414 | "inputFields": null, 1415 | "interfaces": [], 1416 | "enumValues": null, 1417 | "possibleTypes": null 1418 | }, 1419 | { 1420 | "kind": "OBJECT", 1421 | "name": "OpenHours", 1422 | "description": null, 1423 | "fields": [ 1424 | { 1425 | "name": "is_overnight", 1426 | "description": "Whether the business opens overnight or not. When this is true, the end time will be lower than the start time.", 1427 | "args": [], 1428 | "type": { 1429 | "kind": "SCALAR", 1430 | "name": "Boolean", 1431 | "ofType": null 1432 | }, 1433 | "isDeprecated": false, 1434 | "deprecationReason": null 1435 | }, 1436 | { 1437 | "name": "end", 1438 | "description": "End of the opening hours in a day, in 24-hour clock notation, like 2130 means 9:30 PM.", 1439 | "args": [], 1440 | "type": { 1441 | "kind": "SCALAR", 1442 | "name": "String", 1443 | "ofType": null 1444 | }, 1445 | "isDeprecated": false, 1446 | "deprecationReason": null 1447 | }, 1448 | { 1449 | "name": "start", 1450 | "description": "Start of the opening hours in a day, in 24-hour clock notation, like 1000 means 10 AM.", 1451 | "args": [], 1452 | "type": { 1453 | "kind": "SCALAR", 1454 | "name": "String", 1455 | "ofType": null 1456 | }, 1457 | "isDeprecated": false, 1458 | "deprecationReason": null 1459 | }, 1460 | { 1461 | "name": "day", 1462 | "description": "From 0 to 6, representing day of the week from Monday to Sunday. Notice that\nyou may get the same day of the week more than once if the business has more\nthan one opening time slots.", 1463 | "args": [], 1464 | "type": { 1465 | "kind": "SCALAR", 1466 | "name": "Int", 1467 | "ofType": null 1468 | }, 1469 | "isDeprecated": false, 1470 | "deprecationReason": null 1471 | } 1472 | ], 1473 | "inputFields": null, 1474 | "interfaces": [], 1475 | "enumValues": null, 1476 | "possibleTypes": null 1477 | }, 1478 | { 1479 | "kind": "OBJECT", 1480 | "name": "SpecialHours", 1481 | "description": null, 1482 | "fields": [ 1483 | { 1484 | "name": "is_overnight", 1485 | "description": "Whether the business opens overnight or not. When this is true, the end time will be lower than the start time.", 1486 | "args": [], 1487 | "type": { 1488 | "kind": "SCALAR", 1489 | "name": "Boolean", 1490 | "ofType": null 1491 | }, 1492 | "isDeprecated": false, 1493 | "deprecationReason": null 1494 | }, 1495 | { 1496 | "name": "is_closed", 1497 | "description": "Whether the business is closed on the indicated date.", 1498 | "args": [], 1499 | "type": { 1500 | "kind": "SCALAR", 1501 | "name": "Boolean", 1502 | "ofType": null 1503 | }, 1504 | "isDeprecated": false, 1505 | "deprecationReason": null 1506 | }, 1507 | { 1508 | "name": "end", 1509 | "description": "End of the opening hours in a day, in 24-hour clock notation, like 2130 means 9:30 PM.", 1510 | "args": [], 1511 | "type": { 1512 | "kind": "SCALAR", 1513 | "name": "String", 1514 | "ofType": null 1515 | }, 1516 | "isDeprecated": false, 1517 | "deprecationReason": null 1518 | }, 1519 | { 1520 | "name": "start", 1521 | "description": "Start of the opening hours in a day, in 24-hour clock notation, like 1000 means 10 AM.", 1522 | "args": [], 1523 | "type": { 1524 | "kind": "SCALAR", 1525 | "name": "String", 1526 | "ofType": null 1527 | }, 1528 | "isDeprecated": false, 1529 | "deprecationReason": null 1530 | }, 1531 | { 1532 | "name": "date", 1533 | "description": "The date for which the special hours apply inISO8601 format, AKA YYYY-MM-DD", 1534 | "args": [], 1535 | "type": { 1536 | "kind": "SCALAR", 1537 | "name": "Date", 1538 | "ofType": null 1539 | }, 1540 | "isDeprecated": false, 1541 | "deprecationReason": null 1542 | } 1543 | ], 1544 | "inputFields": null, 1545 | "interfaces": [], 1546 | "enumValues": null, 1547 | "possibleTypes": null 1548 | }, 1549 | { 1550 | "kind": "SCALAR", 1551 | "name": "Date", 1552 | "description": "The `Date` scalar type represents a Date\nvalue as specified by\n[iso8601](https://en.wikipedia.org/wiki/ISO_8601).", 1553 | "fields": null, 1554 | "inputFields": null, 1555 | "interfaces": null, 1556 | "enumValues": null, 1557 | "possibleTypes": null 1558 | }, 1559 | { 1560 | "kind": "OBJECT", 1561 | "name": "Review", 1562 | "description": null, 1563 | "fields": [ 1564 | { 1565 | "name": "id", 1566 | "description": "Yelp ID of this review.", 1567 | "args": [], 1568 | "type": { 1569 | "kind": "SCALAR", 1570 | "name": "String", 1571 | "ofType": null 1572 | }, 1573 | "isDeprecated": false, 1574 | "deprecationReason": null 1575 | }, 1576 | { 1577 | "name": "rating", 1578 | "description": "Rating of this review.", 1579 | "args": [], 1580 | "type": { 1581 | "kind": "SCALAR", 1582 | "name": "Int", 1583 | "ofType": null 1584 | }, 1585 | "isDeprecated": false, 1586 | "deprecationReason": null 1587 | }, 1588 | { 1589 | "name": "user", 1590 | "description": "The user who wrote the review.", 1591 | "args": [], 1592 | "type": { 1593 | "kind": "OBJECT", 1594 | "name": "User", 1595 | "ofType": null 1596 | }, 1597 | "isDeprecated": false, 1598 | "deprecationReason": null 1599 | }, 1600 | { 1601 | "name": "text", 1602 | "description": "Text excerpt of this review.", 1603 | "args": [], 1604 | "type": { 1605 | "kind": "SCALAR", 1606 | "name": "String", 1607 | "ofType": null 1608 | }, 1609 | "isDeprecated": false, 1610 | "deprecationReason": null 1611 | }, 1612 | { 1613 | "name": "time_created", 1614 | "description": "The time that the review was created in PST.", 1615 | "args": [], 1616 | "type": { 1617 | "kind": "SCALAR", 1618 | "name": "String", 1619 | "ofType": null 1620 | }, 1621 | "isDeprecated": false, 1622 | "deprecationReason": null 1623 | }, 1624 | { 1625 | "name": "url", 1626 | "description": "URL of this review.", 1627 | "args": [], 1628 | "type": { 1629 | "kind": "SCALAR", 1630 | "name": "String", 1631 | "ofType": null 1632 | }, 1633 | "isDeprecated": false, 1634 | "deprecationReason": null 1635 | }, 1636 | { 1637 | "name": "public_response", 1638 | "description": "Details about the publicly visible response to this review posted by the business owner.", 1639 | "args": [], 1640 | "type": { 1641 | "kind": "OBJECT", 1642 | "name": "PublicReviewResponse", 1643 | "ofType": null 1644 | }, 1645 | "isDeprecated": false, 1646 | "deprecationReason": null 1647 | } 1648 | ], 1649 | "inputFields": null, 1650 | "interfaces": [], 1651 | "enumValues": null, 1652 | "possibleTypes": null 1653 | }, 1654 | { 1655 | "kind": "OBJECT", 1656 | "name": "User", 1657 | "description": null, 1658 | "fields": [ 1659 | { 1660 | "name": "id", 1661 | "description": "The User's ID, a 22 character string", 1662 | "args": [], 1663 | "type": { 1664 | "kind": "SCALAR", 1665 | "name": "String", 1666 | "ofType": null 1667 | }, 1668 | "isDeprecated": false, 1669 | "deprecationReason": null 1670 | }, 1671 | { 1672 | "name": "profile_url", 1673 | "description": "User's profile url", 1674 | "args": [], 1675 | "type": { 1676 | "kind": "SCALAR", 1677 | "name": "String", 1678 | "ofType": null 1679 | }, 1680 | "isDeprecated": false, 1681 | "deprecationReason": null 1682 | }, 1683 | { 1684 | "name": "image_url", 1685 | "description": "URL of the user's profile photo.", 1686 | "args": [], 1687 | "type": { 1688 | "kind": "SCALAR", 1689 | "name": "String", 1690 | "ofType": null 1691 | }, 1692 | "isDeprecated": false, 1693 | "deprecationReason": null 1694 | }, 1695 | { 1696 | "name": "name", 1697 | "description": "Name of the user.", 1698 | "args": [], 1699 | "type": { 1700 | "kind": "SCALAR", 1701 | "name": "String", 1702 | "ofType": null 1703 | }, 1704 | "isDeprecated": false, 1705 | "deprecationReason": null 1706 | } 1707 | ], 1708 | "inputFields": null, 1709 | "interfaces": [], 1710 | "enumValues": null, 1711 | "possibleTypes": null 1712 | }, 1713 | { 1714 | "kind": "OBJECT", 1715 | "name": "PublicReviewResponse", 1716 | "description": null, 1717 | "fields": [ 1718 | { 1719 | "name": "text", 1720 | "description": "Text of this public review response.", 1721 | "args": [], 1722 | "type": { 1723 | "kind": "SCALAR", 1724 | "name": "String", 1725 | "ofType": null 1726 | }, 1727 | "isDeprecated": false, 1728 | "deprecationReason": null 1729 | }, 1730 | { 1731 | "name": "time_created", 1732 | "description": "The time that this public review response was created in ISO8601 format.", 1733 | "args": [], 1734 | "type": { 1735 | "kind": "SCALAR", 1736 | "name": "DateTime", 1737 | "ofType": null 1738 | }, 1739 | "isDeprecated": false, 1740 | "deprecationReason": null 1741 | }, 1742 | { 1743 | "name": "business_user", 1744 | "description": "Details about business user associated with the business who posted this public review response comment.", 1745 | "args": [], 1746 | "type": { 1747 | "kind": "OBJECT", 1748 | "name": "BusinessUser", 1749 | "ofType": null 1750 | }, 1751 | "isDeprecated": false, 1752 | "deprecationReason": null 1753 | } 1754 | ], 1755 | "inputFields": null, 1756 | "interfaces": [], 1757 | "enumValues": null, 1758 | "possibleTypes": null 1759 | }, 1760 | { 1761 | "kind": "SCALAR", 1762 | "name": "DateTime", 1763 | "description": "The `DateTime` scalar type represents a DateTime\nvalue as specified by\n[iso8601](https://en.wikipedia.org/wiki/ISO_8601).", 1764 | "fields": null, 1765 | "inputFields": null, 1766 | "interfaces": null, 1767 | "enumValues": null, 1768 | "possibleTypes": null 1769 | }, 1770 | { 1771 | "kind": "OBJECT", 1772 | "name": "BusinessUser", 1773 | "description": null, 1774 | "fields": [ 1775 | { 1776 | "name": "name", 1777 | "description": "Name of the business user.", 1778 | "args": [], 1779 | "type": { 1780 | "kind": "SCALAR", 1781 | "name": "String", 1782 | "ofType": null 1783 | }, 1784 | "isDeprecated": false, 1785 | "deprecationReason": null 1786 | }, 1787 | { 1788 | "name": "role", 1789 | "description": "Business role for the business user.", 1790 | "args": [], 1791 | "type": { 1792 | "kind": "SCALAR", 1793 | "name": "String", 1794 | "ofType": null 1795 | }, 1796 | "isDeprecated": false, 1797 | "deprecationReason": null 1798 | }, 1799 | { 1800 | "name": "photo_url", 1801 | "description": "URL of the business user's profile photo.", 1802 | "args": [], 1803 | "type": { 1804 | "kind": "SCALAR", 1805 | "name": "String", 1806 | "ofType": null 1807 | }, 1808 | "isDeprecated": false, 1809 | "deprecationReason": null 1810 | } 1811 | ], 1812 | "inputFields": null, 1813 | "interfaces": [], 1814 | "enumValues": null, 1815 | "possibleTypes": null 1816 | }, 1817 | { 1818 | "kind": "OBJECT", 1819 | "name": "BusinessAttributes", 1820 | "description": null, 1821 | "fields": [ 1822 | { 1823 | "name": "gender_neutral_restrooms", 1824 | "description": "Whether business has gender neutral restrooms. See https://www.yelpblog.com/2017/06/find-gender-neutral-restrooms-160000-businesses-yelp\nfor more details.", 1825 | "args": [], 1826 | "type": { 1827 | "kind": "OBJECT", 1828 | "name": "BusinessAttribute", 1829 | "ofType": null 1830 | }, 1831 | "isDeprecated": false, 1832 | "deprecationReason": null 1833 | }, 1834 | { 1835 | "name": "open_to_all", 1836 | "description": "Whether business has opted in to the \"Open to All\" pledge. See\nhttps://www.yelpblog.com/2018/07/opentoall for more details.", 1837 | "args": [], 1838 | "type": { 1839 | "kind": "OBJECT", 1840 | "name": "BusinessAttribute", 1841 | "ofType": null 1842 | }, 1843 | "isDeprecated": false, 1844 | "deprecationReason": null 1845 | }, 1846 | { 1847 | "name": "wheelchair_accessible", 1848 | "description": "Whether business is wheelchair accessible.", 1849 | "args": [], 1850 | "type": { 1851 | "kind": "OBJECT", 1852 | "name": "BusinessAttribute", 1853 | "ofType": null 1854 | }, 1855 | "isDeprecated": false, 1856 | "deprecationReason": null 1857 | } 1858 | ], 1859 | "inputFields": null, 1860 | "interfaces": [], 1861 | "enumValues": null, 1862 | "possibleTypes": null 1863 | }, 1864 | { 1865 | "kind": "OBJECT", 1866 | "name": "BusinessAttribute", 1867 | "description": null, 1868 | "fields": [ 1869 | { 1870 | "name": "name_code", 1871 | "description": "The machine-friendly name of this business attribute.", 1872 | "args": [], 1873 | "type": { 1874 | "kind": "SCALAR", 1875 | "name": "String", 1876 | "ofType": null 1877 | }, 1878 | "isDeprecated": false, 1879 | "deprecationReason": null 1880 | }, 1881 | { 1882 | "name": "value_code", 1883 | "description": "The machine-friendly value of this business attribute.", 1884 | "args": [], 1885 | "type": { 1886 | "kind": "SCALAR", 1887 | "name": "String", 1888 | "ofType": null 1889 | }, 1890 | "isDeprecated": false, 1891 | "deprecationReason": null 1892 | } 1893 | ], 1894 | "inputFields": null, 1895 | "interfaces": [], 1896 | "enumValues": null, 1897 | "possibleTypes": null 1898 | }, 1899 | { 1900 | "kind": "OBJECT", 1901 | "name": "Transactions", 1902 | "description": null, 1903 | "fields": [ 1904 | { 1905 | "name": "restaurant_reservations", 1906 | "description": "Online reservations via Yelp Reservations.", 1907 | "args": [], 1908 | "type": { 1909 | "kind": "OBJECT", 1910 | "name": "RestaurantReservations", 1911 | "ofType": null 1912 | }, 1913 | "isDeprecated": false, 1914 | "deprecationReason": null 1915 | } 1916 | ], 1917 | "inputFields": null, 1918 | "interfaces": [], 1919 | "enumValues": null, 1920 | "possibleTypes": null 1921 | }, 1922 | { 1923 | "kind": "OBJECT", 1924 | "name": "RestaurantReservations", 1925 | "description": null, 1926 | "fields": [ 1927 | { 1928 | "name": "url", 1929 | "description": "Visit this action link URL to go directly into the Yelp Reservations flow for this business.", 1930 | "args": [], 1931 | "type": { 1932 | "kind": "SCALAR", 1933 | "name": "String", 1934 | "ofType": null 1935 | }, 1936 | "isDeprecated": false, 1937 | "deprecationReason": null 1938 | } 1939 | ], 1940 | "inputFields": null, 1941 | "interfaces": [], 1942 | "enumValues": null, 1943 | "possibleTypes": null 1944 | }, 1945 | { 1946 | "kind": "OBJECT", 1947 | "name": "BusinessMessaging", 1948 | "description": null, 1949 | "fields": [ 1950 | { 1951 | "name": "url", 1952 | "description": "Visit this action link URL to go directly into the business messaging flow for this business.", 1953 | "args": [], 1954 | "type": { 1955 | "kind": "SCALAR", 1956 | "name": "String", 1957 | "ofType": null 1958 | }, 1959 | "isDeprecated": false, 1960 | "deprecationReason": null 1961 | }, 1962 | { 1963 | "name": "use_case_text", 1964 | "description": "The localized text description of the type of messaging this business is enabled for. Example: \"Request a Quote\"", 1965 | "args": [], 1966 | "type": { 1967 | "kind": "SCALAR", 1968 | "name": "String", 1969 | "ofType": null 1970 | }, 1971 | "isDeprecated": false, 1972 | "deprecationReason": null 1973 | } 1974 | ], 1975 | "inputFields": null, 1976 | "interfaces": [], 1977 | "enumValues": null, 1978 | "possibleTypes": null 1979 | }, 1980 | { 1981 | "kind": "ENUM", 1982 | "name": "MatchThreshold", 1983 | "description": "An enumeration.", 1984 | "fields": null, 1985 | "inputFields": null, 1986 | "interfaces": null, 1987 | "enumValues": [ 1988 | { 1989 | "name": "NONE", 1990 | "description": null, 1991 | "isDeprecated": false, 1992 | "deprecationReason": null 1993 | }, 1994 | { 1995 | "name": "DEFAULT", 1996 | "description": null, 1997 | "isDeprecated": false, 1998 | "deprecationReason": null 1999 | }, 2000 | { 2001 | "name": "STRICT", 2002 | "description": null, 2003 | "isDeprecated": false, 2004 | "deprecationReason": null 2005 | } 2006 | ], 2007 | "possibleTypes": null 2008 | }, 2009 | { 2010 | "kind": "OBJECT", 2011 | "name": "Businesses", 2012 | "description": null, 2013 | "fields": [ 2014 | { 2015 | "name": "business", 2016 | "description": "A list of business Yelp finds based on the search criteria.", 2017 | "args": [], 2018 | "type": { 2019 | "kind": "LIST", 2020 | "name": null, 2021 | "ofType": { 2022 | "kind": "OBJECT", 2023 | "name": "Business", 2024 | "ofType": null 2025 | } 2026 | }, 2027 | "isDeprecated": false, 2028 | "deprecationReason": null 2029 | }, 2030 | { 2031 | "name": "total", 2032 | "description": "Total number of businesses found.", 2033 | "args": [], 2034 | "type": { 2035 | "kind": "SCALAR", 2036 | "name": "Int", 2037 | "ofType": null 2038 | }, 2039 | "isDeprecated": false, 2040 | "deprecationReason": null 2041 | } 2042 | ], 2043 | "inputFields": null, 2044 | "interfaces": [], 2045 | "enumValues": null, 2046 | "possibleTypes": null 2047 | }, 2048 | { 2049 | "kind": "OBJECT", 2050 | "name": "Reviews", 2051 | "description": null, 2052 | "fields": [ 2053 | { 2054 | "name": "review", 2055 | "description": "The reviews objects.", 2056 | "args": [], 2057 | "type": { 2058 | "kind": "LIST", 2059 | "name": null, 2060 | "ofType": { 2061 | "kind": "OBJECT", 2062 | "name": "Review", 2063 | "ofType": null 2064 | } 2065 | }, 2066 | "isDeprecated": false, 2067 | "deprecationReason": null 2068 | }, 2069 | { 2070 | "name": "total", 2071 | "description": "Total number of reviews.", 2072 | "args": [], 2073 | "type": { 2074 | "kind": "SCALAR", 2075 | "name": "Int", 2076 | "ofType": null 2077 | }, 2078 | "isDeprecated": false, 2079 | "deprecationReason": null 2080 | }, 2081 | { 2082 | "name": "possible_languages", 2083 | "description": "A list of languages for which the business has at least one review.", 2084 | "args": [], 2085 | "type": { 2086 | "kind": "LIST", 2087 | "name": null, 2088 | "ofType": { 2089 | "kind": "OBJECT", 2090 | "name": "Language", 2091 | "ofType": null 2092 | } 2093 | }, 2094 | "isDeprecated": false, 2095 | "deprecationReason": null 2096 | }, 2097 | { 2098 | "name": "business", 2099 | "description": "The business associated with the reviews", 2100 | "args": [], 2101 | "type": { 2102 | "kind": "OBJECT", 2103 | "name": "Business", 2104 | "ofType": null 2105 | }, 2106 | "isDeprecated": false, 2107 | "deprecationReason": null 2108 | } 2109 | ], 2110 | "inputFields": null, 2111 | "interfaces": [], 2112 | "enumValues": null, 2113 | "possibleTypes": null 2114 | }, 2115 | { 2116 | "kind": "OBJECT", 2117 | "name": "Event", 2118 | "description": null, 2119 | "fields": [ 2120 | { 2121 | "name": "name", 2122 | "description": "Name of this event.", 2123 | "args": [], 2124 | "type": { 2125 | "kind": "SCALAR", 2126 | "name": "String", 2127 | "ofType": null 2128 | }, 2129 | "isDeprecated": false, 2130 | "deprecationReason": null 2131 | }, 2132 | { 2133 | "name": "id", 2134 | "description": "Event id.", 2135 | "args": [], 2136 | "type": { 2137 | "kind": "SCALAR", 2138 | "name": "String", 2139 | "ofType": null 2140 | }, 2141 | "isDeprecated": false, 2142 | "deprecationReason": null 2143 | }, 2144 | { 2145 | "name": "business", 2146 | "description": "The business tied to this event.", 2147 | "args": [], 2148 | "type": { 2149 | "kind": "OBJECT", 2150 | "name": "Business", 2151 | "ofType": null 2152 | }, 2153 | "isDeprecated": false, 2154 | "deprecationReason": null 2155 | }, 2156 | { 2157 | "name": "business_id", 2158 | "description": "The ID of the related business.", 2159 | "args": [], 2160 | "type": { 2161 | "kind": "SCALAR", 2162 | "name": "String", 2163 | "ofType": null 2164 | }, 2165 | "isDeprecated": false, 2166 | "deprecationReason": null 2167 | }, 2168 | { 2169 | "name": "attending_count", 2170 | "description": "Number of Yelp users attending this event.", 2171 | "args": [], 2172 | "type": { 2173 | "kind": "SCALAR", 2174 | "name": "String", 2175 | "ofType": null 2176 | }, 2177 | "isDeprecated": false, 2178 | "deprecationReason": null 2179 | }, 2180 | { 2181 | "name": "category", 2182 | "description": "The category of this event.", 2183 | "args": [], 2184 | "type": { 2185 | "kind": "SCALAR", 2186 | "name": "String", 2187 | "ofType": null 2188 | }, 2189 | "isDeprecated": false, 2190 | "deprecationReason": null 2191 | }, 2192 | { 2193 | "name": "cost", 2194 | "description": "Cost of attending this event.", 2195 | "args": [], 2196 | "type": { 2197 | "kind": "SCALAR", 2198 | "name": "Int", 2199 | "ofType": null 2200 | }, 2201 | "isDeprecated": false, 2202 | "deprecationReason": null 2203 | }, 2204 | { 2205 | "name": "cost_max", 2206 | "description": "Maximum cost of this event.", 2207 | "args": [], 2208 | "type": { 2209 | "kind": "SCALAR", 2210 | "name": "Int", 2211 | "ofType": null 2212 | }, 2213 | "isDeprecated": false, 2214 | "deprecationReason": null 2215 | }, 2216 | { 2217 | "name": "description", 2218 | "description": "Description excerpt of this event.", 2219 | "args": [], 2220 | "type": { 2221 | "kind": "SCALAR", 2222 | "name": "String", 2223 | "ofType": null 2224 | }, 2225 | "isDeprecated": false, 2226 | "deprecationReason": null 2227 | }, 2228 | { 2229 | "name": "event_site_url", 2230 | "description": "Yelp page of this event.", 2231 | "args": [], 2232 | "type": { 2233 | "kind": "SCALAR", 2234 | "name": "String", 2235 | "ofType": null 2236 | }, 2237 | "isDeprecated": false, 2238 | "deprecationReason": null 2239 | }, 2240 | { 2241 | "name": "image_url", 2242 | "description": "Yelp image url of this event.", 2243 | "args": [], 2244 | "type": { 2245 | "kind": "SCALAR", 2246 | "name": "String", 2247 | "ofType": null 2248 | }, 2249 | "isDeprecated": false, 2250 | "deprecationReason": null 2251 | }, 2252 | { 2253 | "name": "interested_count", 2254 | "description": "Number of Yelp users interested in attending this event.", 2255 | "args": [], 2256 | "type": { 2257 | "kind": "SCALAR", 2258 | "name": "String", 2259 | "ofType": null 2260 | }, 2261 | "isDeprecated": false, 2262 | "deprecationReason": null 2263 | }, 2264 | { 2265 | "name": "is_canceled", 2266 | "description": "Whether this event is canceled.", 2267 | "args": [], 2268 | "type": { 2269 | "kind": "SCALAR", 2270 | "name": "Boolean", 2271 | "ofType": null 2272 | }, 2273 | "isDeprecated": false, 2274 | "deprecationReason": null 2275 | }, 2276 | { 2277 | "name": "is_free", 2278 | "description": "Whether this event is free.", 2279 | "args": [], 2280 | "type": { 2281 | "kind": "SCALAR", 2282 | "name": "Boolean", 2283 | "ofType": null 2284 | }, 2285 | "isDeprecated": false, 2286 | "deprecationReason": null 2287 | }, 2288 | { 2289 | "name": "is_official", 2290 | "description": "Whether this event is created by a Yelp community manager.", 2291 | "args": [], 2292 | "type": { 2293 | "kind": "SCALAR", 2294 | "name": "Boolean", 2295 | "ofType": null 2296 | }, 2297 | "isDeprecated": false, 2298 | "deprecationReason": null 2299 | }, 2300 | { 2301 | "name": "latitude", 2302 | "description": "Latitude of this event.", 2303 | "args": [], 2304 | "type": { 2305 | "kind": "SCALAR", 2306 | "name": "Float", 2307 | "ofType": null 2308 | }, 2309 | "isDeprecated": false, 2310 | "deprecationReason": null 2311 | }, 2312 | { 2313 | "name": "longitude", 2314 | "description": "Longitude of this event.", 2315 | "args": [], 2316 | "type": { 2317 | "kind": "SCALAR", 2318 | "name": "Float", 2319 | "ofType": null 2320 | }, 2321 | "isDeprecated": false, 2322 | "deprecationReason": null 2323 | }, 2324 | { 2325 | "name": "location", 2326 | "description": "The location of this business, including address, city, state, postal code and country.", 2327 | "args": [], 2328 | "type": { 2329 | "kind": "OBJECT", 2330 | "name": "Location", 2331 | "ofType": null 2332 | }, 2333 | "isDeprecated": false, 2334 | "deprecationReason": null 2335 | }, 2336 | { 2337 | "name": "tickets_url", 2338 | "description": "URL to buy tickets for this event.", 2339 | "args": [], 2340 | "type": { 2341 | "kind": "SCALAR", 2342 | "name": "String", 2343 | "ofType": null 2344 | }, 2345 | "isDeprecated": false, 2346 | "deprecationReason": null 2347 | }, 2348 | { 2349 | "name": "time_end", 2350 | "description": "Time this event ends. Returns time and date in the following format - \"YYYY-MM-DD HH-mm\".", 2351 | "args": [], 2352 | "type": { 2353 | "kind": "SCALAR", 2354 | "name": "String", 2355 | "ofType": null 2356 | }, 2357 | "isDeprecated": false, 2358 | "deprecationReason": null 2359 | }, 2360 | { 2361 | "name": "time_start", 2362 | "description": "Time the event starts. Returns time and date in the following format - \"YYYY-MM-DD HH-mm\".", 2363 | "args": [], 2364 | "type": { 2365 | "kind": "SCALAR", 2366 | "name": "String", 2367 | "ofType": null 2368 | }, 2369 | "isDeprecated": false, 2370 | "deprecationReason": null 2371 | } 2372 | ], 2373 | "inputFields": null, 2374 | "interfaces": [], 2375 | "enumValues": null, 2376 | "possibleTypes": null 2377 | }, 2378 | { 2379 | "kind": "OBJECT", 2380 | "name": "Events", 2381 | "description": null, 2382 | "fields": [ 2383 | { 2384 | "name": "events", 2385 | "description": "List of events found matching search criteria.", 2386 | "args": [], 2387 | "type": { 2388 | "kind": "LIST", 2389 | "name": null, 2390 | "ofType": { 2391 | "kind": "OBJECT", 2392 | "name": "Event", 2393 | "ofType": null 2394 | } 2395 | }, 2396 | "isDeprecated": false, 2397 | "deprecationReason": null 2398 | }, 2399 | { 2400 | "name": "total", 2401 | "description": "Total number of events found.", 2402 | "args": [], 2403 | "type": { 2404 | "kind": "SCALAR", 2405 | "name": "Int", 2406 | "ofType": null 2407 | }, 2408 | "isDeprecated": false, 2409 | "deprecationReason": null 2410 | } 2411 | ], 2412 | "inputFields": null, 2413 | "interfaces": [], 2414 | "enumValues": null, 2415 | "possibleTypes": null 2416 | }, 2417 | { 2418 | "kind": "OBJECT", 2419 | "name": "Categories", 2420 | "description": null, 2421 | "fields": [ 2422 | { 2423 | "name": "category", 2424 | "description": "The category objects.", 2425 | "args": [], 2426 | "type": { 2427 | "kind": "LIST", 2428 | "name": null, 2429 | "ofType": { 2430 | "kind": "OBJECT", 2431 | "name": "Category", 2432 | "ofType": null 2433 | } 2434 | }, 2435 | "isDeprecated": false, 2436 | "deprecationReason": null 2437 | }, 2438 | { 2439 | "name": "total", 2440 | "description": "Total number of categories.", 2441 | "args": [], 2442 | "type": { 2443 | "kind": "SCALAR", 2444 | "name": "Int", 2445 | "ofType": null 2446 | }, 2447 | "isDeprecated": false, 2448 | "deprecationReason": null 2449 | } 2450 | ], 2451 | "inputFields": null, 2452 | "interfaces": [], 2453 | "enumValues": null, 2454 | "possibleTypes": null 2455 | }, 2456 | { 2457 | "kind": "OBJECT", 2458 | "name": "__Schema", 2459 | "description": "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.", 2460 | "fields": [ 2461 | { 2462 | "name": "types", 2463 | "description": "A list of all types supported by this server.", 2464 | "args": [], 2465 | "type": { 2466 | "kind": "NON_NULL", 2467 | "name": null, 2468 | "ofType": { 2469 | "kind": "LIST", 2470 | "name": null, 2471 | "ofType": { 2472 | "kind": "NON_NULL", 2473 | "name": null, 2474 | "ofType": { 2475 | "kind": "OBJECT", 2476 | "name": "__Type", 2477 | "ofType": null 2478 | } 2479 | } 2480 | } 2481 | }, 2482 | "isDeprecated": false, 2483 | "deprecationReason": null 2484 | }, 2485 | { 2486 | "name": "queryType", 2487 | "description": "The type that query operations will be rooted at.", 2488 | "args": [], 2489 | "type": { 2490 | "kind": "NON_NULL", 2491 | "name": null, 2492 | "ofType": { 2493 | "kind": "OBJECT", 2494 | "name": "__Type", 2495 | "ofType": null 2496 | } 2497 | }, 2498 | "isDeprecated": false, 2499 | "deprecationReason": null 2500 | }, 2501 | { 2502 | "name": "mutationType", 2503 | "description": "If this server supports mutation, the type that mutation operations will be rooted at.", 2504 | "args": [], 2505 | "type": { 2506 | "kind": "OBJECT", 2507 | "name": "__Type", 2508 | "ofType": null 2509 | }, 2510 | "isDeprecated": false, 2511 | "deprecationReason": null 2512 | }, 2513 | { 2514 | "name": "subscriptionType", 2515 | "description": "If this server support subscription, the type that subscription operations will be rooted at.", 2516 | "args": [], 2517 | "type": { 2518 | "kind": "OBJECT", 2519 | "name": "__Type", 2520 | "ofType": null 2521 | }, 2522 | "isDeprecated": false, 2523 | "deprecationReason": null 2524 | }, 2525 | { 2526 | "name": "directives", 2527 | "description": "A list of all directives supported by this server.", 2528 | "args": [], 2529 | "type": { 2530 | "kind": "NON_NULL", 2531 | "name": null, 2532 | "ofType": { 2533 | "kind": "LIST", 2534 | "name": null, 2535 | "ofType": { 2536 | "kind": "NON_NULL", 2537 | "name": null, 2538 | "ofType": { 2539 | "kind": "OBJECT", 2540 | "name": "__Directive", 2541 | "ofType": null 2542 | } 2543 | } 2544 | } 2545 | }, 2546 | "isDeprecated": false, 2547 | "deprecationReason": null 2548 | } 2549 | ], 2550 | "inputFields": null, 2551 | "interfaces": [], 2552 | "enumValues": null, 2553 | "possibleTypes": null 2554 | }, 2555 | { 2556 | "kind": "OBJECT", 2557 | "name": "__Type", 2558 | "description": "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name and description, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.", 2559 | "fields": [ 2560 | { 2561 | "name": "kind", 2562 | "description": null, 2563 | "args": [], 2564 | "type": { 2565 | "kind": "NON_NULL", 2566 | "name": null, 2567 | "ofType": { 2568 | "kind": "ENUM", 2569 | "name": "__TypeKind", 2570 | "ofType": null 2571 | } 2572 | }, 2573 | "isDeprecated": false, 2574 | "deprecationReason": null 2575 | }, 2576 | { 2577 | "name": "name", 2578 | "description": null, 2579 | "args": [], 2580 | "type": { 2581 | "kind": "SCALAR", 2582 | "name": "String", 2583 | "ofType": null 2584 | }, 2585 | "isDeprecated": false, 2586 | "deprecationReason": null 2587 | }, 2588 | { 2589 | "name": "description", 2590 | "description": null, 2591 | "args": [], 2592 | "type": { 2593 | "kind": "SCALAR", 2594 | "name": "String", 2595 | "ofType": null 2596 | }, 2597 | "isDeprecated": false, 2598 | "deprecationReason": null 2599 | }, 2600 | { 2601 | "name": "fields", 2602 | "description": null, 2603 | "args": [ 2604 | { 2605 | "name": "includeDeprecated", 2606 | "description": null, 2607 | "type": { 2608 | "kind": "SCALAR", 2609 | "name": "Boolean", 2610 | "ofType": null 2611 | }, 2612 | "defaultValue": "false" 2613 | } 2614 | ], 2615 | "type": { 2616 | "kind": "LIST", 2617 | "name": null, 2618 | "ofType": { 2619 | "kind": "NON_NULL", 2620 | "name": null, 2621 | "ofType": { 2622 | "kind": "OBJECT", 2623 | "name": "__Field", 2624 | "ofType": null 2625 | } 2626 | } 2627 | }, 2628 | "isDeprecated": false, 2629 | "deprecationReason": null 2630 | }, 2631 | { 2632 | "name": "interfaces", 2633 | "description": null, 2634 | "args": [], 2635 | "type": { 2636 | "kind": "LIST", 2637 | "name": null, 2638 | "ofType": { 2639 | "kind": "NON_NULL", 2640 | "name": null, 2641 | "ofType": { 2642 | "kind": "OBJECT", 2643 | "name": "__Type", 2644 | "ofType": null 2645 | } 2646 | } 2647 | }, 2648 | "isDeprecated": false, 2649 | "deprecationReason": null 2650 | }, 2651 | { 2652 | "name": "possibleTypes", 2653 | "description": null, 2654 | "args": [], 2655 | "type": { 2656 | "kind": "LIST", 2657 | "name": null, 2658 | "ofType": { 2659 | "kind": "NON_NULL", 2660 | "name": null, 2661 | "ofType": { 2662 | "kind": "OBJECT", 2663 | "name": "__Type", 2664 | "ofType": null 2665 | } 2666 | } 2667 | }, 2668 | "isDeprecated": false, 2669 | "deprecationReason": null 2670 | }, 2671 | { 2672 | "name": "enumValues", 2673 | "description": null, 2674 | "args": [ 2675 | { 2676 | "name": "includeDeprecated", 2677 | "description": null, 2678 | "type": { 2679 | "kind": "SCALAR", 2680 | "name": "Boolean", 2681 | "ofType": null 2682 | }, 2683 | "defaultValue": "false" 2684 | } 2685 | ], 2686 | "type": { 2687 | "kind": "LIST", 2688 | "name": null, 2689 | "ofType": { 2690 | "kind": "NON_NULL", 2691 | "name": null, 2692 | "ofType": { 2693 | "kind": "OBJECT", 2694 | "name": "__EnumValue", 2695 | "ofType": null 2696 | } 2697 | } 2698 | }, 2699 | "isDeprecated": false, 2700 | "deprecationReason": null 2701 | }, 2702 | { 2703 | "name": "inputFields", 2704 | "description": null, 2705 | "args": [], 2706 | "type": { 2707 | "kind": "LIST", 2708 | "name": null, 2709 | "ofType": { 2710 | "kind": "NON_NULL", 2711 | "name": null, 2712 | "ofType": { 2713 | "kind": "OBJECT", 2714 | "name": "__InputValue", 2715 | "ofType": null 2716 | } 2717 | } 2718 | }, 2719 | "isDeprecated": false, 2720 | "deprecationReason": null 2721 | }, 2722 | { 2723 | "name": "ofType", 2724 | "description": null, 2725 | "args": [], 2726 | "type": { 2727 | "kind": "OBJECT", 2728 | "name": "__Type", 2729 | "ofType": null 2730 | }, 2731 | "isDeprecated": false, 2732 | "deprecationReason": null 2733 | } 2734 | ], 2735 | "inputFields": null, 2736 | "interfaces": [], 2737 | "enumValues": null, 2738 | "possibleTypes": null 2739 | }, 2740 | { 2741 | "kind": "ENUM", 2742 | "name": "__TypeKind", 2743 | "description": "An enum describing what kind of type a given `__Type` is.", 2744 | "fields": null, 2745 | "inputFields": null, 2746 | "interfaces": null, 2747 | "enumValues": [ 2748 | { 2749 | "name": "SCALAR", 2750 | "description": "Indicates this type is a scalar.", 2751 | "isDeprecated": false, 2752 | "deprecationReason": null 2753 | }, 2754 | { 2755 | "name": "OBJECT", 2756 | "description": "Indicates this type is an object. `fields` and `interfaces` are valid fields.", 2757 | "isDeprecated": false, 2758 | "deprecationReason": null 2759 | }, 2760 | { 2761 | "name": "INTERFACE", 2762 | "description": "Indicates this type is an interface. `fields` and `possibleTypes` are valid fields.", 2763 | "isDeprecated": false, 2764 | "deprecationReason": null 2765 | }, 2766 | { 2767 | "name": "UNION", 2768 | "description": "Indicates this type is a union. `possibleTypes` is a valid field.", 2769 | "isDeprecated": false, 2770 | "deprecationReason": null 2771 | }, 2772 | { 2773 | "name": "ENUM", 2774 | "description": "Indicates this type is an enum. `enumValues` is a valid field.", 2775 | "isDeprecated": false, 2776 | "deprecationReason": null 2777 | }, 2778 | { 2779 | "name": "INPUT_OBJECT", 2780 | "description": "Indicates this type is an input object. `inputFields` is a valid field.", 2781 | "isDeprecated": false, 2782 | "deprecationReason": null 2783 | }, 2784 | { 2785 | "name": "LIST", 2786 | "description": "Indicates this type is a list. `ofType` is a valid field.", 2787 | "isDeprecated": false, 2788 | "deprecationReason": null 2789 | }, 2790 | { 2791 | "name": "NON_NULL", 2792 | "description": "Indicates this type is a non-null. `ofType` is a valid field.", 2793 | "isDeprecated": false, 2794 | "deprecationReason": null 2795 | } 2796 | ], 2797 | "possibleTypes": null 2798 | }, 2799 | { 2800 | "kind": "OBJECT", 2801 | "name": "__Field", 2802 | "description": "Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.", 2803 | "fields": [ 2804 | { 2805 | "name": "name", 2806 | "description": null, 2807 | "args": [], 2808 | "type": { 2809 | "kind": "NON_NULL", 2810 | "name": null, 2811 | "ofType": { 2812 | "kind": "SCALAR", 2813 | "name": "String", 2814 | "ofType": null 2815 | } 2816 | }, 2817 | "isDeprecated": false, 2818 | "deprecationReason": null 2819 | }, 2820 | { 2821 | "name": "description", 2822 | "description": null, 2823 | "args": [], 2824 | "type": { 2825 | "kind": "SCALAR", 2826 | "name": "String", 2827 | "ofType": null 2828 | }, 2829 | "isDeprecated": false, 2830 | "deprecationReason": null 2831 | }, 2832 | { 2833 | "name": "args", 2834 | "description": null, 2835 | "args": [], 2836 | "type": { 2837 | "kind": "NON_NULL", 2838 | "name": null, 2839 | "ofType": { 2840 | "kind": "LIST", 2841 | "name": null, 2842 | "ofType": { 2843 | "kind": "NON_NULL", 2844 | "name": null, 2845 | "ofType": { 2846 | "kind": "OBJECT", 2847 | "name": "__InputValue", 2848 | "ofType": null 2849 | } 2850 | } 2851 | } 2852 | }, 2853 | "isDeprecated": false, 2854 | "deprecationReason": null 2855 | }, 2856 | { 2857 | "name": "type", 2858 | "description": null, 2859 | "args": [], 2860 | "type": { 2861 | "kind": "NON_NULL", 2862 | "name": null, 2863 | "ofType": { 2864 | "kind": "OBJECT", 2865 | "name": "__Type", 2866 | "ofType": null 2867 | } 2868 | }, 2869 | "isDeprecated": false, 2870 | "deprecationReason": null 2871 | }, 2872 | { 2873 | "name": "isDeprecated", 2874 | "description": null, 2875 | "args": [], 2876 | "type": { 2877 | "kind": "NON_NULL", 2878 | "name": null, 2879 | "ofType": { 2880 | "kind": "SCALAR", 2881 | "name": "Boolean", 2882 | "ofType": null 2883 | } 2884 | }, 2885 | "isDeprecated": false, 2886 | "deprecationReason": null 2887 | }, 2888 | { 2889 | "name": "deprecationReason", 2890 | "description": null, 2891 | "args": [], 2892 | "type": { 2893 | "kind": "SCALAR", 2894 | "name": "String", 2895 | "ofType": null 2896 | }, 2897 | "isDeprecated": false, 2898 | "deprecationReason": null 2899 | } 2900 | ], 2901 | "inputFields": null, 2902 | "interfaces": [], 2903 | "enumValues": null, 2904 | "possibleTypes": null 2905 | }, 2906 | { 2907 | "kind": "OBJECT", 2908 | "name": "__InputValue", 2909 | "description": "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.", 2910 | "fields": [ 2911 | { 2912 | "name": "name", 2913 | "description": null, 2914 | "args": [], 2915 | "type": { 2916 | "kind": "NON_NULL", 2917 | "name": null, 2918 | "ofType": { 2919 | "kind": "SCALAR", 2920 | "name": "String", 2921 | "ofType": null 2922 | } 2923 | }, 2924 | "isDeprecated": false, 2925 | "deprecationReason": null 2926 | }, 2927 | { 2928 | "name": "description", 2929 | "description": null, 2930 | "args": [], 2931 | "type": { 2932 | "kind": "SCALAR", 2933 | "name": "String", 2934 | "ofType": null 2935 | }, 2936 | "isDeprecated": false, 2937 | "deprecationReason": null 2938 | }, 2939 | { 2940 | "name": "type", 2941 | "description": null, 2942 | "args": [], 2943 | "type": { 2944 | "kind": "NON_NULL", 2945 | "name": null, 2946 | "ofType": { 2947 | "kind": "OBJECT", 2948 | "name": "__Type", 2949 | "ofType": null 2950 | } 2951 | }, 2952 | "isDeprecated": false, 2953 | "deprecationReason": null 2954 | }, 2955 | { 2956 | "name": "defaultValue", 2957 | "description": "A GraphQL-formatted string representing the default value for this input value.", 2958 | "args": [], 2959 | "type": { 2960 | "kind": "SCALAR", 2961 | "name": "String", 2962 | "ofType": null 2963 | }, 2964 | "isDeprecated": false, 2965 | "deprecationReason": null 2966 | } 2967 | ], 2968 | "inputFields": null, 2969 | "interfaces": [], 2970 | "enumValues": null, 2971 | "possibleTypes": null 2972 | }, 2973 | { 2974 | "kind": "OBJECT", 2975 | "name": "__EnumValue", 2976 | "description": "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.", 2977 | "fields": [ 2978 | { 2979 | "name": "name", 2980 | "description": null, 2981 | "args": [], 2982 | "type": { 2983 | "kind": "NON_NULL", 2984 | "name": null, 2985 | "ofType": { 2986 | "kind": "SCALAR", 2987 | "name": "String", 2988 | "ofType": null 2989 | } 2990 | }, 2991 | "isDeprecated": false, 2992 | "deprecationReason": null 2993 | }, 2994 | { 2995 | "name": "description", 2996 | "description": null, 2997 | "args": [], 2998 | "type": { 2999 | "kind": "SCALAR", 3000 | "name": "String", 3001 | "ofType": null 3002 | }, 3003 | "isDeprecated": false, 3004 | "deprecationReason": null 3005 | }, 3006 | { 3007 | "name": "isDeprecated", 3008 | "description": null, 3009 | "args": [], 3010 | "type": { 3011 | "kind": "NON_NULL", 3012 | "name": null, 3013 | "ofType": { 3014 | "kind": "SCALAR", 3015 | "name": "Boolean", 3016 | "ofType": null 3017 | } 3018 | }, 3019 | "isDeprecated": false, 3020 | "deprecationReason": null 3021 | }, 3022 | { 3023 | "name": "deprecationReason", 3024 | "description": null, 3025 | "args": [], 3026 | "type": { 3027 | "kind": "SCALAR", 3028 | "name": "String", 3029 | "ofType": null 3030 | }, 3031 | "isDeprecated": false, 3032 | "deprecationReason": null 3033 | } 3034 | ], 3035 | "inputFields": null, 3036 | "interfaces": [], 3037 | "enumValues": null, 3038 | "possibleTypes": null 3039 | }, 3040 | { 3041 | "kind": "OBJECT", 3042 | "name": "__Directive", 3043 | "description": "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.", 3044 | "fields": [ 3045 | { 3046 | "name": "name", 3047 | "description": null, 3048 | "args": [], 3049 | "type": { 3050 | "kind": "NON_NULL", 3051 | "name": null, 3052 | "ofType": { 3053 | "kind": "SCALAR", 3054 | "name": "String", 3055 | "ofType": null 3056 | } 3057 | }, 3058 | "isDeprecated": false, 3059 | "deprecationReason": null 3060 | }, 3061 | { 3062 | "name": "description", 3063 | "description": null, 3064 | "args": [], 3065 | "type": { 3066 | "kind": "SCALAR", 3067 | "name": "String", 3068 | "ofType": null 3069 | }, 3070 | "isDeprecated": false, 3071 | "deprecationReason": null 3072 | }, 3073 | { 3074 | "name": "locations", 3075 | "description": null, 3076 | "args": [], 3077 | "type": { 3078 | "kind": "NON_NULL", 3079 | "name": null, 3080 | "ofType": { 3081 | "kind": "LIST", 3082 | "name": null, 3083 | "ofType": { 3084 | "kind": "NON_NULL", 3085 | "name": null, 3086 | "ofType": { 3087 | "kind": "ENUM", 3088 | "name": "__DirectiveLocation", 3089 | "ofType": null 3090 | } 3091 | } 3092 | } 3093 | }, 3094 | "isDeprecated": false, 3095 | "deprecationReason": null 3096 | }, 3097 | { 3098 | "name": "args", 3099 | "description": null, 3100 | "args": [], 3101 | "type": { 3102 | "kind": "NON_NULL", 3103 | "name": null, 3104 | "ofType": { 3105 | "kind": "LIST", 3106 | "name": null, 3107 | "ofType": { 3108 | "kind": "NON_NULL", 3109 | "name": null, 3110 | "ofType": { 3111 | "kind": "OBJECT", 3112 | "name": "__InputValue", 3113 | "ofType": null 3114 | } 3115 | } 3116 | } 3117 | }, 3118 | "isDeprecated": false, 3119 | "deprecationReason": null 3120 | } 3121 | ], 3122 | "inputFields": null, 3123 | "interfaces": [], 3124 | "enumValues": null, 3125 | "possibleTypes": null 3126 | }, 3127 | { 3128 | "kind": "ENUM", 3129 | "name": "__DirectiveLocation", 3130 | "description": "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.", 3131 | "fields": null, 3132 | "inputFields": null, 3133 | "interfaces": null, 3134 | "enumValues": [ 3135 | { 3136 | "name": "QUERY", 3137 | "description": "Location adjacent to a query operation.", 3138 | "isDeprecated": false, 3139 | "deprecationReason": null 3140 | }, 3141 | { 3142 | "name": "MUTATION", 3143 | "description": "Location adjacent to a mutation operation.", 3144 | "isDeprecated": false, 3145 | "deprecationReason": null 3146 | }, 3147 | { 3148 | "name": "SUBSCRIPTION", 3149 | "description": "Location adjacent to a subscription operation.", 3150 | "isDeprecated": false, 3151 | "deprecationReason": null 3152 | }, 3153 | { 3154 | "name": "FIELD", 3155 | "description": "Location adjacent to a field.", 3156 | "isDeprecated": false, 3157 | "deprecationReason": null 3158 | }, 3159 | { 3160 | "name": "FRAGMENT_DEFINITION", 3161 | "description": "Location adjacent to a fragment definition.", 3162 | "isDeprecated": false, 3163 | "deprecationReason": null 3164 | }, 3165 | { 3166 | "name": "FRAGMENT_SPREAD", 3167 | "description": "Location adjacent to a fragment spread.", 3168 | "isDeprecated": false, 3169 | "deprecationReason": null 3170 | }, 3171 | { 3172 | "name": "INLINE_FRAGMENT", 3173 | "description": "Location adjacent to an inline fragment.", 3174 | "isDeprecated": false, 3175 | "deprecationReason": null 3176 | }, 3177 | { 3178 | "name": "VARIABLE_DEFINITION", 3179 | "description": "Location adjacent to a variable definition.", 3180 | "isDeprecated": false, 3181 | "deprecationReason": null 3182 | }, 3183 | { 3184 | "name": "SCHEMA", 3185 | "description": "Location adjacent to a schema definition.", 3186 | "isDeprecated": false, 3187 | "deprecationReason": null 3188 | }, 3189 | { 3190 | "name": "SCALAR", 3191 | "description": "Location adjacent to a scalar definition.", 3192 | "isDeprecated": false, 3193 | "deprecationReason": null 3194 | }, 3195 | { 3196 | "name": "OBJECT", 3197 | "description": "Location adjacent to an object type definition.", 3198 | "isDeprecated": false, 3199 | "deprecationReason": null 3200 | }, 3201 | { 3202 | "name": "FIELD_DEFINITION", 3203 | "description": "Location adjacent to a field definition.", 3204 | "isDeprecated": false, 3205 | "deprecationReason": null 3206 | }, 3207 | { 3208 | "name": "ARGUMENT_DEFINITION", 3209 | "description": "Location adjacent to an argument definition.", 3210 | "isDeprecated": false, 3211 | "deprecationReason": null 3212 | }, 3213 | { 3214 | "name": "INTERFACE", 3215 | "description": "Location adjacent to an interface definition.", 3216 | "isDeprecated": false, 3217 | "deprecationReason": null 3218 | }, 3219 | { 3220 | "name": "UNION", 3221 | "description": "Location adjacent to a union definition.", 3222 | "isDeprecated": false, 3223 | "deprecationReason": null 3224 | }, 3225 | { 3226 | "name": "ENUM", 3227 | "description": "Location adjacent to an enum definition.", 3228 | "isDeprecated": false, 3229 | "deprecationReason": null 3230 | }, 3231 | { 3232 | "name": "ENUM_VALUE", 3233 | "description": "Location adjacent to an enum value definition.", 3234 | "isDeprecated": false, 3235 | "deprecationReason": null 3236 | }, 3237 | { 3238 | "name": "INPUT_OBJECT", 3239 | "description": "Location adjacent to an input object type definition.", 3240 | "isDeprecated": false, 3241 | "deprecationReason": null 3242 | }, 3243 | { 3244 | "name": "INPUT_FIELD_DEFINITION", 3245 | "description": "Location adjacent to an input object field definition.", 3246 | "isDeprecated": false, 3247 | "deprecationReason": null 3248 | } 3249 | ], 3250 | "possibleTypes": null 3251 | } 3252 | ], 3253 | "directives": [ 3254 | { 3255 | "name": "skip", 3256 | "description": "Directs the executor to skip this field or fragment when the `if` argument is true.", 3257 | "locations": [ 3258 | "FIELD", 3259 | "FRAGMENT_SPREAD", 3260 | "INLINE_FRAGMENT" 3261 | ], 3262 | "args": [ 3263 | { 3264 | "name": "if", 3265 | "description": "Skipped when true.", 3266 | "type": { 3267 | "kind": "NON_NULL", 3268 | "name": null, 3269 | "ofType": { 3270 | "kind": "SCALAR", 3271 | "name": "Boolean", 3272 | "ofType": null 3273 | } 3274 | }, 3275 | "defaultValue": null 3276 | } 3277 | ] 3278 | }, 3279 | { 3280 | "name": "include", 3281 | "description": "Directs the executor to include this field or fragment only when the `if` argument is true.", 3282 | "locations": [ 3283 | "FIELD", 3284 | "FRAGMENT_SPREAD", 3285 | "INLINE_FRAGMENT" 3286 | ], 3287 | "args": [ 3288 | { 3289 | "name": "if", 3290 | "description": "Included when true.", 3291 | "type": { 3292 | "kind": "NON_NULL", 3293 | "name": null, 3294 | "ofType": { 3295 | "kind": "SCALAR", 3296 | "name": "Boolean", 3297 | "ofType": null 3298 | } 3299 | }, 3300 | "defaultValue": null 3301 | } 3302 | ] 3303 | }, 3304 | { 3305 | "name": "deprecated", 3306 | "description": "Marks an element of a GraphQL schema as no longer supported.", 3307 | "locations": [ 3308 | "FIELD_DEFINITION", 3309 | "ENUM_VALUE" 3310 | ], 3311 | "args": [ 3312 | { 3313 | "name": "reason", 3314 | "description": "Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax (as specified by [CommonMark](https://commonmark.org/).", 3315 | "type": { 3316 | "kind": "SCALAR", 3317 | "name": "String", 3318 | "ofType": null 3319 | }, 3320 | "defaultValue": "\"No longer supported\"" 3321 | } 3322 | ] 3323 | }, 3324 | { 3325 | "name": "client", 3326 | "description": "Direct the client to resolve this field locally, either from the cache or local resolvers.", 3327 | "locations": [ 3328 | "FIELD", 3329 | "FRAGMENT_DEFINITION", 3330 | "INLINE_FRAGMENT" 3331 | ], 3332 | "args": [ 3333 | { 3334 | "name": "always", 3335 | "description": "When true, the client will never use the cache for this value. See\nhttps://www.apollographql.com/docs/react/essentials/local-state/#forcing-resolvers-with-clientalways-true", 3336 | "type": { 3337 | "kind": "SCALAR", 3338 | "name": "Boolean", 3339 | "ofType": null 3340 | }, 3341 | "defaultValue": null 3342 | } 3343 | ] 3344 | }, 3345 | { 3346 | "name": "export", 3347 | "description": "Export this locally resolved field as a variable to be used in the remainder of this query. See\nhttps://www.apollographql.com/docs/react/essentials/local-state/#using-client-fields-as-variables", 3348 | "locations": [ 3349 | "FIELD" 3350 | ], 3351 | "args": [ 3352 | { 3353 | "name": "as", 3354 | "description": "The variable name to export this field as.", 3355 | "type": { 3356 | "kind": "NON_NULL", 3357 | "name": null, 3358 | "ofType": { 3359 | "kind": "SCALAR", 3360 | "name": "String", 3361 | "ofType": null 3362 | } 3363 | }, 3364 | "defaultValue": null 3365 | } 3366 | ] 3367 | }, 3368 | { 3369 | "name": "connection", 3370 | "description": "Specify a custom store key for this result. See\nhttps://www.apollographql.com/docs/react/advanced/caching/#the-connection-directive", 3371 | "locations": [ 3372 | "FIELD" 3373 | ], 3374 | "args": [ 3375 | { 3376 | "name": "key", 3377 | "description": "Specify the store key.", 3378 | "type": { 3379 | "kind": "NON_NULL", 3380 | "name": null, 3381 | "ofType": { 3382 | "kind": "SCALAR", 3383 | "name": "String", 3384 | "ofType": null 3385 | } 3386 | }, 3387 | "defaultValue": null 3388 | }, 3389 | { 3390 | "name": "filter", 3391 | "description": "An array of query argument names to include in the generated custom store key.", 3392 | "type": { 3393 | "kind": "LIST", 3394 | "name": null, 3395 | "ofType": { 3396 | "kind": "NON_NULL", 3397 | "name": null, 3398 | "ofType": { 3399 | "kind": "SCALAR", 3400 | "name": "String", 3401 | "ofType": null 3402 | } 3403 | } 3404 | }, 3405 | "defaultValue": null 3406 | } 3407 | ] 3408 | } 3409 | ] 3410 | } 3411 | } -------------------------------------------------------------------------------- /GraphQLSwiftUI/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | NSAppTransportSecurity 24 | 25 | NSExceptionDomains 26 | 27 | yelp.com 28 | 29 | NSExceptionAllowsInsecureHTTPLoads 30 | 31 | NSIncludesSubdomains 32 | 33 | 34 | 35 | 36 | NSLocationWhenInUseUsageDescription 37 | We need your location to pass to the YELP API 38 | UIApplicationSceneManifest 39 | 40 | UIApplicationSupportsMultipleScenes 41 | 42 | UISceneConfigurations 43 | 44 | UIWindowSceneSessionRoleApplication 45 | 46 | 47 | UISceneConfigurationName 48 | Default Configuration 49 | UISceneDelegateClassName 50 | $(PRODUCT_MODULE_NAME).SceneDelegate 51 | 52 | 53 | 54 | 55 | UILaunchStoryboardName 56 | LaunchScreen 57 | UIRequiredDeviceCapabilities 58 | 59 | armv7 60 | 61 | UISupportedInterfaceOrientations 62 | 63 | UIInterfaceOrientationPortrait 64 | UIInterfaceOrientationLandscapeLeft 65 | UIInterfaceOrientationLandscapeRight 66 | 67 | UISupportedInterfaceOrientations~ipad 68 | 69 | UIInterfaceOrientationPortrait 70 | UIInterfaceOrientationPortraitUpsideDown 71 | UIInterfaceOrientationLandscapeLeft 72 | UIInterfaceOrientationLandscapeRight 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /GraphQLSwiftUI/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /GraphQLSwiftUI/SceneDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SceneDelegate.swift 3 | // GraphQLSwiftUI 4 | // 5 | // Created by TouchToFly on 4/20/20. 6 | // Copyright © 2020 TouchToFly. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SwiftUI 11 | 12 | class SceneDelegate: UIResponder, UIWindowSceneDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | lazy var networkingController: ApolloNetworkingController = ApolloNetworkingController() 17 | 18 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { 19 | // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. 20 | // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. 21 | // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). 22 | 23 | // Create the SwiftUI view that provides the window contents. 24 | let contentView = ContentView().environmentObject(self.networkingController).environmentObject(self.networkingController.locationController) 25 | 26 | // Use a UIHostingController as window root view controller. 27 | if let windowScene = scene as? UIWindowScene { 28 | let window = UIWindow(windowScene: windowScene) 29 | window.rootViewController = UIHostingController(rootView: contentView) 30 | self.window = window 31 | window.makeKeyAndVisible() 32 | } 33 | } 34 | 35 | func sceneDidDisconnect(_ scene: UIScene) { 36 | // Called as the scene is being released by the system. 37 | // This occurs shortly after the scene enters the background, or when its session is discarded. 38 | // Release any resources associated with this scene that can be re-created the next time the scene connects. 39 | // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). 40 | } 41 | 42 | func sceneDidBecomeActive(_ scene: UIScene) { 43 | // Called when the scene has moved from an inactive state to an active state. 44 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. 45 | } 46 | 47 | func sceneWillResignActive(_ scene: UIScene) { 48 | // Called when the scene will move from an active state to an inactive state. 49 | // This may occur due to temporary interruptions (ex. an incoming phone call). 50 | } 51 | 52 | func sceneWillEnterForeground(_ scene: UIScene) { 53 | // Called as the scene transitions from the background to the foreground. 54 | // Use this method to undo the changes made on entering the background. 55 | } 56 | 57 | func sceneDidEnterBackground(_ scene: UIScene) { 58 | // Called as the scene transitions from the foreground to the background. 59 | // Use this method to save data, release shared resources, and store enough scene-specific state information 60 | // to restore the scene back to its current state. 61 | } 62 | 63 | 64 | } 65 | 66 | -------------------------------------------------------------------------------- /GraphQLSwiftUI/Views/BusinessFragmentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BusinessFragmentView.swift 3 | // GraphQLSwiftUI 4 | // 5 | // Created by TouchToFly on 4/22/20. 6 | // Copyright © 2020 TouchToFly. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | import SDWebImageSwiftUI 11 | 12 | struct BusinessFragmentView: View { 13 | //MARK: Properties 14 | let business: BusinessFragment 15 | 16 | //MARK: Computed Properties 17 | var body: some View { 18 | 19 | ZStack { 20 | 21 | WebImage(url: self.parse(object: self.business)) 22 | .resizable() 23 | .indicator(.activity) // Activity Indicator 24 | .transition(.fade) // Fade Transition 25 | .scaledToFill() 26 | .frame(alignment: .center) 27 | 28 | VStack { 29 | HStack { 30 | Spacer() 31 | Image(systemName: "link").frame(width: 46, height: 46).background(Color.gray.opacity(0.7)).foregroundColor(Color.white).overlay( 32 | RoundedRectangle(cornerRadius: 23).stroke(Color.white, lineWidth: 0.5) 33 | ).cornerRadius(23).padding().shadow(radius: 7) 34 | } 35 | Spacer() 36 | HStack { 37 | VStack(alignment: .leading) { 38 | Text("Name: \(self.business.name ?? "No name")").padding(.all, 4) 39 | Text("Rating: \(String(format:"%.1f", self.business.rating ?? -1))").padding(.all, 4) 40 | Text("Distance: \(String(format:"%.0f", self.business.distance ?? -1)) Meters").padding(.all, 4) 41 | }.background(Color.gray.opacity(0.7)).foregroundColor(Color.white).overlay( 42 | RoundedRectangle(cornerRadius: 8).stroke(Color.white, lineWidth: 0.5) 43 | ).cornerRadius(8).padding().shadow(radius: 7) 44 | Spacer() 45 | } 46 | } 47 | } 48 | } 49 | 50 | //MARK: Init 51 | init(fragment: BusinessFragment) { 52 | self.business = fragment 53 | } 54 | 55 | //MARK: Functions 56 | func parse(object: BusinessFragment) -> URL { 57 | guard let firstImage = object.photos?.first else { 58 | return URL(string: "")! 59 | } 60 | return URL(string: firstImage ?? "")! 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /GraphQLSwiftUI/Views/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // GraphQLSwiftUI 4 | // 5 | // Created by TouchToFly on 4/20/20. 6 | // Copyright © 2020 TouchToFly. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | import CoreLocation 11 | 12 | struct ContentView: View { 13 | //Get the networking controller from the environment objects. 14 | @EnvironmentObject var networkingController: ApolloNetworkingController 15 | //Do the same with the location controller even though we could access this controller as a property of the network controller. 16 | @EnvironmentObject var locationController: LocationController 17 | 18 | //Swift UI Magic 19 | var body: some View { 20 | //Make a ZStack so you can layout in three dimensions 21 | ZStack { 22 | //A VStack will hold what we need. 23 | VStack { 24 | //Include the header view and a divider no matter what. 25 | HeaderView().padding() 26 | Color.black.frame(height: 0.5) 27 | //If no location is authorized so a message abotu what to do in the middle of the screen. 28 | if self.locationController.authorization != CLAuthorizationStatus.authorizedWhenInUse { 29 | Spacer() 30 | Text("Please tap the location button to authorize location.").multilineTextAlignment(.center).padding() 31 | Spacer() 32 | //If there was a networking error show the search bar and a description of the error. 33 | }else if self.networkingController.businessesQueryError != nil { 34 | SearchBar() 35 | Spacer() 36 | Text("There was an error making the request: \(self.networkingController.businessesQueryError?.localizedDescription ?? "Unknown error")").multilineTextAlignment(.center).padding() 37 | Spacer() 38 | //If we have results then display then in a list. Add a button to the Cell so that we can get touch events to open the link in Safari. 39 | }else { 40 | SearchBar() 41 | List(self.networkingController.businesses, id: \.id) { business in 42 | ZStack { 43 | Button(action: { self.open(urlString: business.url) }) { 44 | Color.clear 45 | } 46 | BusinessFragmentView.init(fragment: business) 47 | } 48 | } 49 | } 50 | } 51 | } 52 | } 53 | 54 | func open(urlString: String?) { 55 | guard let url = URL(string: urlString ?? "") else { return } 56 | UIApplication.shared.open(url) 57 | } 58 | } 59 | 60 | struct ContentView_Previews: PreviewProvider { 61 | static var previews: some View { 62 | ContentView() 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /GraphQLSwiftUI/Views/HeaderView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // HeaderView.swift 3 | // GraphQLSwiftUI 4 | // 5 | // Created by TouchToFly on 4/22/20. 6 | // Copyright © 2020 TouchToFly. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct HeaderView: View { 12 | //MARK: Properties 13 | 14 | 15 | var body: some View { 16 | HStack { 17 | Text("YELP API").font(Font.largeTitle) 18 | Spacer() 19 | LocationView() 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /GraphQLSwiftUI/Views/LocationView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LocationView.swift 3 | // GraphQLSwiftUI 4 | // 5 | // Created by TouchToFly on 4/21/20. 6 | // Copyright © 2020 TouchToFly. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct LocationView: View { 12 | @EnvironmentObject var locationController: LocationController 13 | 14 | var locationSymbol: String { 15 | switch self.locationController.authorization { 16 | case .authorizedWhenInUse: 17 | return "location.fill" 18 | default: 19 | return "location.slash.fill" 20 | } 21 | } 22 | 23 | var locationSymbolColor: Color { 24 | switch self.locationController.authorization { 25 | case .authorizedWhenInUse: 26 | return Color.blue 27 | default: 28 | return Color.red 29 | } 30 | } 31 | 32 | var body: some View { 33 | Button(action: { self.locationController.manager.requestWhenInUseAuthorization() }) { 34 | Image(systemName: self.locationSymbol).foregroundColor(self.locationSymbolColor) 35 | }.frame(width: 46, height: 46).cornerRadius(23).background(Color.white).clipShape(Circle()).shadow(radius: 7) 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /GraphQLSwiftUI/Views/SearchBar.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SearchBar.swift 3 | // GraphQLSwiftUI 4 | // 5 | // Created by TouchToFly on 4/21/20. 6 | // Copyright © 2020 TouchToFly. All rights reserved. 7 | // 8 | 9 | import SwiftUI 10 | 11 | struct SearchBar: View { 12 | //MARK: Properties 13 | @EnvironmentObject var networkingController: ApolloNetworkingController 14 | 15 | 16 | var body: some View { 17 | VStack { 18 | HStack { 19 | Image(systemName: "magnifyingglass") 20 | TextField("Search the YELP API", text: self.$networkingController.searchText) 21 | }.padding() 22 | Color.black.frame(height: 0.5).opacity(0.7) 23 | } 24 | 25 | } 26 | } 27 | 28 | 29 | struct SearchBar_Previews: PreviewProvider { 30 | static var previews: some View { 31 | SearchBar().padding() 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Images/Header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joninsky/GraphQL-SwiftUI-Demo/f985c66064aee313aba0ce1ddbb2fabb6a9f2dcd/Images/Header.png -------------------------------------------------------------------------------- /Images/Screenshots.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/joninsky/GraphQL-SwiftUI-Demo/f985c66064aee313aba0ce1ddbb2fabb6a9f2dcd/Images/Screenshots.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GraphQL, Combine and SwiftUI 2 | 3 | ![GraphQL, Combine and SwiftUI](/Images/Header.png) 4 | 5 | # Result 6 | 7 | ![Finished Product](/Images/Screenshots.png) --------------------------------------------------------------------------------