Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix schemaName in Apollo config #54

Merged
merged 3 commits into from
Oct 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ios/.swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ excluded:
- Carthage
- Pods
- vendor
- DataLayer/Toolkits/RocketToolkit/.build
- DataLayer/Providers/GraphQLProvider/.build
- DataLayer/Toolkits/RocketToolkit/Sources/RocketToolkit/NetworkModels/Apollo
- DataLayer/Toolkits/RocketToolkit/Sources/RocketToolkitMocks

Expand Down
50 changes: 50 additions & 0 deletions ios/DataLayer/Providers/GraphQLProvider/Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"pins" : [
{
"identity" : "apollo-ios",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apollographql/apollo-ios",
"state" : {
"revision" : "29d42fb5b17a2c1823ec0750af8e628067e43b4c",
"version" : "1.0.1"
}
},
{
"identity" : "inflectorkit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/mattt/InflectorKit",
"state" : {
"revision" : "d8cbcc04972690aaa5fc760a2b9ddb3e9f0decd7",
"version" : "1.0.0"
}
},
{
"identity" : "sqlite.swift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/stephencelis/SQLite.swift.git",
"state" : {
"revision" : "4d543d811ee644fa4cc4bfa0be996b4dd6ba0f54",
"version" : "0.13.3"
}
},
{
"identity" : "swift-argument-parser",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-argument-parser.git",
"state" : {
"revision" : "9f39744e025c7d377987f30b03770805dcb0bcd1",
"version" : "1.1.4"
}
},
{
"identity" : "swift-collections",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-collections",
"state" : {
"revision" : "f504716c27d2e5d4144fa4794b12129301d17729",
"version" : "1.0.3"
}
}
],
"version" : 2
}
6 changes: 3 additions & 3 deletions ios/DataLayer/Toolkits/AnalyticsToolkit/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ let package = Package(
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(name: "Utilities", path: "../../DomainLayer/Utilities"),
.package(name: "SharedDomain", path: "../../DomainLayer/SharedDomain"),
.package(name: "AnalyticsProvider", path: "../Providers/AnalyticsProvider")
.package(name: "Utilities", path: "../../../DomainLayer/Utilities"),
.package(name: "SharedDomain", path: "../../../DomainLayer/SharedDomain"),
.package(name: "AnalyticsProvider", path: "../../Providers/AnalyticsProvider")
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
Expand Down
10 changes: 5 additions & 5 deletions ios/DataLayer/Toolkits/AuthToolkit/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ let package = Package(
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(name: "Utilities", path: "../../DomainLayer/Utilities"),
.package(name: "SharedDomain", path: "../../DomainLayer/SharedDomain"),
.package(name: "DatabaseProvider", path: "../Providers/DatabaseProvider"),
.package(name: "KeychainProvider", path: "../Providers/KeychainProvider"),
.package(name: "NetworkProvider", path: "../Providers/NetworkProvider")
.package(name: "Utilities", path: "../../../DomainLayer/Utilities"),
.package(name: "SharedDomain", path: "../../../DomainLayer/SharedDomain"),
.package(name: "DatabaseProvider", path: "../../Providers/DatabaseProvider"),
.package(name: "KeychainProvider", path: "../../Providers/KeychainProvider"),
.package(name: "NetworkProvider", path: "../../Providers/NetworkProvider")
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
Expand Down
4 changes: 2 additions & 2 deletions ios/DataLayer/Toolkits/LocationToolkit/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ let package = Package(
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(name: "SharedDomain", path: "../../DomainLayer/SharedDomain"),
.package(name: "LocationProvider", path: "../Providers/LocationProvider")
.package(name: "SharedDomain", path: "../../../DomainLayer/SharedDomain"),
.package(name: "LocationProvider", path: "../../Providers/LocationProvider")
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
Expand Down
6 changes: 3 additions & 3 deletions ios/DataLayer/Toolkits/PushNotificationsToolkit/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ let package = Package(
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(name: "Utilities", path: "../../DomainLayer/Utilities"),
.package(name: "SharedDomain", path: "../../DomainLayer/SharedDomain"),
.package(name: "PushNotificationsProvider", path: "../Providers/PushNotificationsProvider")
.package(name: "Utilities", path: "../../../DomainLayer/Utilities"),
.package(name: "SharedDomain", path: "../../../DomainLayer/SharedDomain"),
.package(name: "PushNotificationsProvider", path: "../../Providers/PushNotificationsProvider")
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
Expand Down
4 changes: 2 additions & 2 deletions ios/DataLayer/Toolkits/RemoteConfigToolkit/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ let package = Package(
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(name: "SharedDomain", path: "../../DomainLayer/SharedDomain"),
.package(name: "RemoteConfigProvider", path: "../Providers/RemoteConfigProvider")
.package(name: "SharedDomain", path: "../../../DomainLayer/SharedDomain"),
.package(name: "RemoteConfigProvider", path: "../../Providers/RemoteConfigProvider")
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
Expand Down
5 changes: 1 addition & 4 deletions ios/DataLayer/Toolkits/RocketToolkit/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ import PackageDescription

let package = Package(
name: "RocketToolkit",
platforms: [
.iOS(.v14),
.macOS(.v10_14)
],
platforms: [.iOS(.v14)],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"schemaName": "rocket",
"schemaName": "Rocket",
"schemaDownloadConfiguration": {
"downloadMethod": {
"introspection": {
Expand All @@ -13,7 +13,7 @@
},
"downloadTimeout": 60,
"headers": [],
"outputPath": "./schema.graphqls"
"outputPath": "../../Toolkits/RocketToolkit/schema.graphqls"
},
"input": {
"operationSearchPaths": [
Expand All @@ -40,5 +40,8 @@
"path": "./Sources/RocketToolkitMocks"
}
}
},
"options": {
"pruneGeneratedFiles": false
}
}
8 changes: 4 additions & 4 deletions ios/DataLayer/Toolkits/UserToolkit/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ let package = Package(
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(name: "Utilities", path: "../../DomainLayer/Utilities"),
.package(name: "SharedDomain", path: "../../DomainLayer/SharedDomain"),
.package(name: "DatabaseProvider", path: "../Providers/DatabaseProvider"),
.package(name: "NetworkProvider", path: "../Providers/NetworkProvider")
.package(name: "Utilities", path: "../../../DomainLayer/Utilities"),
.package(name: "SharedDomain", path: "../../../DomainLayer/SharedDomain"),
.package(name: "DatabaseProvider", path: "../../Providers/DatabaseProvider"),
.package(name: "NetworkProvider", path: "../../Providers/NetworkProvider")
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
Expand Down
5 changes: 1 addition & 4 deletions ios/DomainLayer/SharedDomain/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ import PackageDescription

let package = Package(
name: "SharedDomain",
platforms: [
.iOS(.v14),
.macOS(.v10_14)
],
platforms: [.iOS(.v14)],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
Expand Down
6 changes: 3 additions & 3 deletions ios/PresentationLayer/Onboarding/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ let package = Package(
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(name: "UIToolkit", path: "./UIToolkit"),
.package(name: "Utilities", path: "../DomainLayer/Utilities"),
.package(name: "SharedDomain", path: "../DomainLayer/SharedDomain"),
.package(name: "UIToolkit", path: "../UIToolkit"),
.package(name: "Utilities", path: "../../DomainLayer/Utilities"),
.package(name: "SharedDomain", path: "../../DomainLayer/SharedDomain"),
.package(url: "https://github.com/hmlongco/Resolver.git", .upToNextMajor(from: "1.0.0"))
],
targets: [
Expand Down
6 changes: 3 additions & 3 deletions ios/PresentationLayer/Profile/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ let package = Package(
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(name: "UIToolkit", path: "./UIToolkit"),
.package(name: "Utilities", path: "../DomainLayer/Utilities"),
.package(name: "SharedDomain", path: "../DomainLayer/SharedDomain"),
.package(name: "UIToolkit", path: "../UIToolkit"),
.package(name: "Utilities", path: "../../DomainLayer/Utilities"),
.package(name: "SharedDomain", path: "../../DomainLayer/SharedDomain"),
.package(url: "https://github.com/hmlongco/Resolver.git", .upToNextMajor(from: "1.0.0"))
],
targets: [
Expand Down
6 changes: 3 additions & 3 deletions ios/PresentationLayer/Recipes/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ let package = Package(
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(name: "UIToolkit", path: "./UIToolkit"),
.package(name: "Utilities", path: "../DomainLayer/Utilities"),
.package(name: "SharedDomain", path: "../DomainLayer/SharedDomain"),
.package(name: "UIToolkit", path: "../UIToolkit"),
.package(name: "Utilities", path: "../../DomainLayer/Utilities"),
.package(name: "SharedDomain", path: "../../DomainLayer/SharedDomain"),
.package(url: "https://github.com/hmlongco/Resolver.git", .upToNextMajor(from: "1.0.0"))
],
targets: [
Expand Down
2 changes: 1 addition & 1 deletion ios/PresentationLayer/UIToolkit/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ let package = Package(
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(name: "Utilities", path: "../DomainLayer/Utilities")
.package(name: "Utilities", path: "../../DomainLayer/Utilities")
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
Expand Down
6 changes: 3 additions & 3 deletions ios/PresentationLayer/Users/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ let package = Package(
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(name: "UIToolkit", path: "./UIToolkit"),
.package(name: "Utilities", path: "../DomainLayer/Utilities"),
.package(name: "SharedDomain", path: "../DomainLayer/SharedDomain"),
.package(name: "UIToolkit", path: "../UIToolkit"),
.package(name: "Utilities", path: "../../DomainLayer/Utilities"),
.package(name: "SharedDomain", path: "../../DomainLayer/SharedDomain"),
.package(url: "https://github.com/hmlongco/Resolver.git", .upToNextMajor(from: "1.0.0"))
],
targets: [
Expand Down
10 changes: 4 additions & 6 deletions ios/scripts/apollo.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
#!/bin/bash

cd "$(dirname "$0")"
cd ../DataLayer/Providers/GraphQLProvider

# RocketToolkit
cd ../DataLayer/Toolkits/RocketToolkit
swift package --disable-sandbox --allow-writing-to-package-directory apollo-fetch-schema
swift package --disable-sandbox --allow-writing-to-package-directory apollo-generate
find ./Sources/RocketToolkitMocks -type f -exec sed -i '' -e "s/rocket/Rocket/g" {} +
cd ../../..
echo "⚙️ RocketToolkit - Downloading GraphQL schema and generating code from queries"
swift package --disable-sandbox --allow-writing-to-package-directory apollo-fetch-schema --path "../../Toolkits/RocketToolkit/apollo-codegen-config.json"
swift package --disable-sandbox --allow-writing-to-package-directory apollo-generate --path "../../Toolkits/RocketToolkit/apollo-codegen-config.json"