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

Add support for Automated Persisted Queries #601

Closed
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
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
[submodule "Carthage/Checkouts/SQLite.swift"]
path = Carthage/Checkouts/SQLite.swift
url = https://github.com/stephencelis/SQLite.swift.git
[submodule "Carthage/Checkouts/CryptoSwift"]
path = Carthage/Checkouts/CryptoSwift
url = https://github.com/krzyzanowskim/CryptoSwift.git
5 changes: 3 additions & 2 deletions Apollo.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Pod::Spec.new do |s|

s.requires_arc = true

s.swift_version = '4.2'
s.swift_version = '5.0'

s.default_subspecs = 'Core'

Expand All @@ -23,14 +23,15 @@ Pod::Spec.new do |s|
s.subspec 'Core' do |ss|
ss.source_files = 'Sources/Apollo/*.swift'
ss.preserve_paths = ['scripts/check-and-run-apollo-cli.sh', 'scripts/check-and-run-apollo-codegen.sh']
ss.dependency 'CryptoSwift'
end

# Apollo provides exactly one persistent cache out-of-the-box, as a reasonable default choice for
# those who require cache persistence. Third-party caches may use different storage mechanisms.
s.subspec 'SQLite' do |ss|
ss.source_files = 'Sources/ApolloSQLite/*.swift'
ss.dependency 'Apollo/Core'
ss.dependency 'SQLite.swift', '~> 0.11.4'
ss.dependency 'SQLite.swift', '~> 0.12.0'
end

# Websocket and subscription support based on Starscream
Expand Down
119 changes: 119 additions & 0 deletions Apollo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
objects = {

/* Begin PBXBuildFile section */
1D91186A2208DD5600F23EFD /* GraphQLFragmentWatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D9118692208DD5600F23EFD /* GraphQLFragmentWatcher.swift */; };
1DAAEBC922C667CF00068B8F /* APQNetworkTransport.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DAAEBC822C667CF00068B8F /* APQNetworkTransport.swift */; };
1DAAEBEF22C6763700068B8F /* CryptoSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DAAEBD922C6721E00068B8F /* CryptoSwift.framework */; };
54DDB0921EA045870009DD99 /* InMemoryNormalizedCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54DDB0911EA045870009DD99 /* InMemoryNormalizedCache.swift */; };
5AC6CA4322AAF7B200B7C94D /* FetchHTTPMethod.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AC6CA4222AAF7B200B7C94D /* FetchHTTPMethod.swift */; };
9F0CA4451EE7F9E90032DD39 /* ApolloTestSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9F8A95781EC0FC1200304A2D /* ApolloTestSupport.framework */; };
Expand Down Expand Up @@ -99,6 +102,41 @@
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
1DAAEBD822C6721E00068B8F /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1DAAEBD022C6721E00068B8F /* CryptoSwift.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 754BE45519693E190098E6F3;
remoteInfo = CryptoSwift;
};
1DAAEBDA22C6721E00068B8F /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1DAAEBD022C6721E00068B8F /* CryptoSwift.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 75211F92207249D8004E41F8;
remoteInfo = "CryptoSwift-TestHostApp";
};
1DAAEBDC22C6721E00068B8F /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1DAAEBD022C6721E00068B8F /* CryptoSwift.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 754BE46019693E190098E6F3;
remoteInfo = Tests;
};
1DAAEBDE22C6721E00068B8F /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1DAAEBD022C6721E00068B8F /* CryptoSwift.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 7595C14A2072E48C00EA1A5F;
remoteInfo = "TestsPerformance-Mac";
};
1DAAEBE022C6721E00068B8F /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1DAAEBD022C6721E00068B8F /* CryptoSwift.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 7564F0602072EAEB00CA5A96;
remoteInfo = "TestsPerformance-iOS";
};
9F0CA4471EE7F9E90032DD39 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 9FC7503B1D2A532C00458D91 /* Project object */;
Expand Down Expand Up @@ -230,6 +268,9 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
1D9118692208DD5600F23EFD /* GraphQLFragmentWatcher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GraphQLFragmentWatcher.swift; sourceTree = "<group>"; };
1DAAEBC822C667CF00068B8F /* APQNetworkTransport.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APQNetworkTransport.swift; sourceTree = "<group>"; };
1DAAEBD022C6721E00068B8F /* CryptoSwift.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = CryptoSwift.xcodeproj; path = Carthage/Checkouts/CryptoSwift/CryptoSwift.xcodeproj; sourceTree = "<group>"; };
54DDB0911EA045870009DD99 /* InMemoryNormalizedCache.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InMemoryNormalizedCache.swift; sourceTree = "<group>"; };
5AC6CA4222AAF7B200B7C94D /* FetchHTTPMethod.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FetchHTTPMethod.swift; sourceTree = "<group>"; };
90690D05224333DA00FC2E54 /* Apollo-Project-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Apollo-Project-Debug.xcconfig"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -348,6 +389,14 @@
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
1DAAEBE922C6763000068B8F /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
1DAAEBEF22C6763700068B8F /* CryptoSwift.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
9F8A95741EC0FC1200304A2D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -415,6 +464,26 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
1DAAEBCD22C66FD300068B8F /* Frameworks */ = {
isa = PBXGroup;
children = (
1DAAEBD022C6721E00068B8F /* CryptoSwift.xcodeproj */,
);
name = Frameworks;
sourceTree = "<group>";
};
1DAAEBD122C6721E00068B8F /* Products */ = {
isa = PBXGroup;
children = (
1DAAEBD922C6721E00068B8F /* CryptoSwift.framework */,
1DAAEBDB22C6721E00068B8F /* CryptoSwift-TestHostApp.app */,
1DAAEBDD22C6721E00068B8F /* Tests.xctest */,
1DAAEBDF22C6721E00068B8F /* TestsPerformance-Mac.xctest */,
1DAAEBE122C6721E00068B8F /* TestsPerformance-iOS.xctest */,
);
name = Products;
sourceTree = "<group>";
};
90690D04224333DA00FC2E54 /* Configuration */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -515,6 +584,7 @@
9FCE2CF41E6C20E000E34457 /* Tests */,
90690D04224333DA00FC2E54 /* Configuration */,
9FC750451D2A532C00458D91 /* Products */,
1DAAEBCD22C66FD300068B8F /* Frameworks */,
);
sourceTree = "<group>";
};
Expand All @@ -541,6 +611,7 @@
9FC750601D2A59C300458D91 /* GraphQLOperation.swift */,
9FC9A9BE1E2C27FB0023C4D5 /* GraphQLResult.swift */,
9FC9A9D21E2FD48B0023C4D5 /* GraphQLError.swift */,
1D9118692208DD5600F23EFD /* GraphQLFragmentWatcher.swift */,
9FCDFD281E33D0CE007519DC /* GraphQLQueryWatcher.swift */,
9FC9A9CE1E2FD0CC0023C4D5 /* Network */,
9FC9A9CA1E2FD05C0023C4D5 /* Store */,
Expand Down Expand Up @@ -593,6 +664,7 @@
9F69FFA81D42855900E000B1 /* NetworkTransport.swift */,
9F4DAF2D1E48B84B00EBFF0B /* HTTPNetworkTransport.swift */,
9FF90A5B1DDDEB100034C3B6 /* GraphQLResponse.swift */,
1DAAEBC822C667CF00068B8F /* APQNetworkTransport.swift */,
);
name = Network;
sourceTree = "<group>";
Expand Down Expand Up @@ -796,6 +868,7 @@
9FC7503F1D2A532C00458D91 /* Sources */,
9FC750411D2A532C00458D91 /* Headers */,
9FC750421D2A532C00458D91 /* Resources */,
1DAAEBE922C6763000068B8F /* Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -927,6 +1000,12 @@
mainGroup = 9FC7503A1D2A532C00458D91;
productRefGroup = 9FC750451D2A532C00458D91 /* Products */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = 1DAAEBD122C6721E00068B8F /* Products */;
ProjectRef = 1DAAEBD022C6721E00068B8F /* CryptoSwift.xcodeproj */;
},
);
projectRoot = "";
targets = (
9FC750431D2A532C00458D91 /* Apollo */,
Expand All @@ -941,6 +1020,44 @@
};
/* End PBXProject section */

/* Begin PBXReferenceProxy section */
1DAAEBD922C6721E00068B8F /* CryptoSwift.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = CryptoSwift.framework;
remoteRef = 1DAAEBD822C6721E00068B8F /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
1DAAEBDB22C6721E00068B8F /* CryptoSwift-TestHostApp.app */ = {
isa = PBXReferenceProxy;
fileType = wrapper.application;
path = "CryptoSwift-TestHostApp.app";
remoteRef = 1DAAEBDA22C6721E00068B8F /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
1DAAEBDD22C6721E00068B8F /* Tests.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = Tests.xctest;
remoteRef = 1DAAEBDC22C6721E00068B8F /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
1DAAEBDF22C6721E00068B8F /* TestsPerformance-Mac.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = "TestsPerformance-Mac.xctest";
remoteRef = 1DAAEBDE22C6721E00068B8F /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
1DAAEBE122C6721E00068B8F /* TestsPerformance-iOS.xctest */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = "TestsPerformance-iOS.xctest";
remoteRef = 1DAAEBE022C6721E00068B8F /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */

/* Begin PBXResourcesBuildPhase section */
9FC750421D2A532C00458D91 /* Resources */ = {
isa = PBXResourcesBuildPhase;
Expand Down Expand Up @@ -1066,6 +1183,7 @@
9F55347B1DE1DB2100E54264 /* ApolloStore.swift in Sources */,
9F69FFA91D42855900E000B1 /* NetworkTransport.swift in Sources */,
9FCDFD291E33D0CE007519DC /* GraphQLQueryWatcher.swift in Sources */,
1D91186A2208DD5600F23EFD /* GraphQLFragmentWatcher.swift in Sources */,
9FC2333D1E66BBF7001E4541 /* GraphQLDependencyTracker.swift in Sources */,
9F19D8441EED568200C57247 /* ResultOrPromise.swift in Sources */,
9FC9A9BF1E2C27FB0023C4D5 /* GraphQLResult.swift in Sources */,
Expand All @@ -1088,6 +1206,7 @@
9FC750611D2A59C300458D91 /* GraphQLOperation.swift in Sources */,
5AC6CA4322AAF7B200B7C94D /* FetchHTTPMethod.swift in Sources */,
9FE941D01E62C771007CDD89 /* Promise.swift in Sources */,
1DAAEBC922C667CF00068B8F /* APQNetworkTransport.swift in Sources */,
9FC750631D2A59F600458D91 /* ApolloClient.swift in Sources */,
9F86B6901E65533D00B885FF /* GraphQLResponseGenerator.swift in Sources */,
9FC9A9C21E2D3CAF0023C4D5 /* GraphQLInputValue.swift in Sources */,
Expand Down
1 change: 1 addition & 0 deletions Cartfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
github "stephencelis/SQLite.swift" ~> 0.12.0
github "daltoniam/Starscream" ~> 3.1.0
github "krzyzanowskim/CryptoSwift"
3 changes: 2 additions & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
github "daltoniam/Starscream" "3.1.0"
github "stephencelis/SQLite.swift" "0.12.0"
github "krzyzanowskim/CryptoSwift" "1.0.0"
github "stephencelis/SQLite.swift" "0.12.2"
1 change: 1 addition & 0 deletions Carthage/Checkouts/CryptoSwift/.github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @krzyzanowskim
21 changes: 21 additions & 0 deletions Carthage/Checkouts/CryptoSwift/.github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
- CryptoSwift version:
- Swift version:
- Platform (iOS/macOS/Linux/...):
- Installation method (CocoaPods/Carthage/SPM/...):
- Project name:

# Description

> To whom may be concerned: I offer professional support to all my open source projects.

# Steps to reproduce


Sample code to reproduce the issue:

```swift
import CryptoSwift

// Code goes here

```
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Bug report
about: Create a report to help us improve

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1.

**Sample code**

```swift



```

**Expected behavior**


**Environment (please complete the following information):**
- Swift version:
- Platform (iOS/macOS/Linux/...):
- Installation method (CocoaPods/Carthage/SPM/...):
- Project name:

**Additional context**
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Fixes #

Checklist:
- [ ] Correct file headers (see CONTRIBUTING.md).
- [ ] Formatted with [SwiftFormat](https://github.com/nicklockwood/SwiftFormat).
- [ ] Tests added.

Changes proposed in this pull request:
-
24 changes: 24 additions & 0 deletions Carthage/Checkouts/CryptoSwift/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
### Xcode ###
.build/
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.xcuserstate
timeline.xctimeline

/Framework
.DS_Store
Carthage/Build

.idea
.vscode
1 change: 1 addition & 0 deletions Carthage/Checkouts/CryptoSwift/.swift-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5.0
11 changes: 11 additions & 0 deletions Carthage/Checkouts/CryptoSwift/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
os:
- linux
- osx
language: generic
sudo: required
dist: trusty
osx_image: xcode10
install:
- eval "$(curl -sL https://swiftenv.fuller.li/install.sh)"
script:
- swift test -c release -Xswiftc -enable-testing -Xswiftc -DCI -Xswiftc -Xfrontend -Xswiftc -solver-memory-threshold -Xswiftc -Xfrontend -Xswiftc 999999999
Loading