Skip to content

Commit

Permalink
WIP: Create CacheConfiguration - Pass it down from ApolloStore
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyMDev committed Sep 21, 2021
1 parent 35a5d43 commit c692d0a
Show file tree
Hide file tree
Showing 25 changed files with 237 additions and 194 deletions.
28 changes: 18 additions & 10 deletions Apollo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,6 @@
DE05862D2669800000265760 /* Matchable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BE071AE2368D34D00FA5952 /* Matchable.swift */; };
DE05862F266980C200265760 /* GraphQLSelectionSet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FC9A9C41E2D6CE70023C4D5 /* GraphQLSelectionSet.swift */; };
DE0586332669948500265760 /* InputValue+Evaluation.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE0586322669948500265760 /* InputValue+Evaluation.swift */; };
DE0586342669956A00265760 /* JSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FC4B91F1D2A6F8D0046A641 /* JSON.swift */; };
DE0586352669956D00265760 /* JSONStandardTypeConversions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F27D4631D40379500715680 /* JSONStandardTypeConversions.swift */; };
DE0586362669957800265760 /* CacheReference.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE664ED92666DF150054DB4F /* CacheReference.swift */; };
DE0586372669958F00265760 /* GraphQLError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FC9A9D21E2FD48B0023C4D5 /* GraphQLError.swift */; };
DE0586392669985000265760 /* Dictionary+Helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE0586382669985000265760 /* Dictionary+Helpers.swift */; };
Expand All @@ -200,7 +198,7 @@
DE181A3226C5C401000C0B9C /* Compression.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE181A3126C5C401000C0B9C /* Compression.swift */; };
DE181A3426C5D8D4000C0B9C /* CompressionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE181A3326C5D8D4000C0B9C /* CompressionTests.swift */; };
DE181A3626C5DE4F000C0B9C /* WebSocketStream.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE181A3526C5DE4F000C0B9C /* WebSocketStream.swift */; };
DE2FCF1D26E806710057EA67 /* SchemaTypeFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE2FCF1C26E806710057EA67 /* SchemaTypeFactory.swift */; };
DE2FCF1D26E806710057EA67 /* SchemaTypeMapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE2FCF1C26E806710057EA67 /* SchemaTypeMapper.swift */; };
DE2FCF1F26E807CC0057EA67 /* CacheTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE2FCF1E26E807CC0057EA67 /* CacheTransaction.swift */; };
DE2FCF2126E807EF0057EA67 /* Cacheable.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE2FCF2026E807EF0057EA67 /* Cacheable.swift */; };
DE2FCF2726E8083A0057EA67 /* Union.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE2FCF2326E8083A0057EA67 /* Union.swift */; };
Expand Down Expand Up @@ -229,6 +227,10 @@
DE6B156A261505660068D642 /* GraphQLMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE6B154A261505450068D642 /* GraphQLMap.swift */; };
DE6B15AF26152BE10068D642 /* DefaultInterceptorProviderIntegrationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE6B15AE26152BE10068D642 /* DefaultInterceptorProviderIntegrationTests.swift */; };
DE6B15B126152BE10068D642 /* Apollo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9FC750441D2A532C00458D91 /* Apollo.framework */; };
DE9C04AC26EAAE4400EC35E7 /* JSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FC4B91F1D2A6F8D0046A641 /* JSON.swift */; };
DE9C04AD26EAAE5400EC35E7 /* JSONStandardTypeConversions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F27D4631D40379500715680 /* JSONStandardTypeConversions.swift */; };
DE9C04AF26EAAEE800EC35E7 /* CacheKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE9C04AE26EAAEE800EC35E7 /* CacheKey.swift */; };
DE9C04B226EAB02C00EC35E7 /* JSONDecodingError.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE9C04B026EAAFF900EC35E7 /* JSONDecodingError.swift */; };
DECD46D0262F64D000924527 /* StarWarsApolloSchemaDownloaderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DECD46CF262F64D000924527 /* StarWarsApolloSchemaDownloaderTests.swift */; };
DECD46FB262F659500924527 /* ApolloCodegenLib.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9B7B6F47233C26D100F32205 /* ApolloCodegenLib.framework */; };
DECD4736262F668500924527 /* UploadAPI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9B2DFBB624E1FA0D00ED3AE6 /* UploadAPI.framework */; };
Expand Down Expand Up @@ -806,7 +808,7 @@
DE181A3126C5C401000C0B9C /* Compression.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Compression.swift; sourceTree = "<group>"; };
DE181A3326C5D8D4000C0B9C /* CompressionTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompressionTests.swift; sourceTree = "<group>"; };
DE181A3526C5DE4F000C0B9C /* WebSocketStream.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebSocketStream.swift; sourceTree = "<group>"; };
DE2FCF1C26E806710057EA67 /* SchemaTypeFactory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SchemaTypeFactory.swift; sourceTree = "<group>"; };
DE2FCF1C26E806710057EA67 /* SchemaTypeMapper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SchemaTypeMapper.swift; sourceTree = "<group>"; };
DE2FCF1E26E807CC0057EA67 /* CacheTransaction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CacheTransaction.swift; sourceTree = "<group>"; };
DE2FCF2026E807EF0057EA67 /* Cacheable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cacheable.swift; sourceTree = "<group>"; };
DE2FCF2326E8083A0057EA67 /* Union.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Union.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -866,6 +868,8 @@
DE6B160B26152D210068D642 /* Project-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Project-Debug.xcconfig"; sourceTree = "<group>"; };
DE6B160C26152D210068D642 /* Workspace-Packaging.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Workspace-Packaging.xcconfig"; sourceTree = "<group>"; };
DE6B160D26152D210068D642 /* Workspace-Shared.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Workspace-Shared.xcconfig"; sourceTree = "<group>"; };
DE9C04AE26EAAEE800EC35E7 /* CacheKey.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CacheKey.swift; sourceTree = "<group>"; };
DE9C04B026EAAFF900EC35E7 /* JSONDecodingError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JSONDecodingError.swift; sourceTree = "<group>"; };
DEA34AF6260E821F00F95F86 /* Apollo-Target-AnimalKingdomAPI.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Apollo-Target-AnimalKingdomAPI.xcconfig"; sourceTree = "<group>"; };
DECD46CF262F64D000924527 /* StarWarsApolloSchemaDownloaderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StarWarsApolloSchemaDownloaderTests.swift; sourceTree = "<group>"; };
DECD490B262F81BF00924527 /* ApolloCodegenTestSupport.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ApolloCodegenTestSupport.framework; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -1493,8 +1497,6 @@
9FC4B9231D2BE4F00046A641 /* JSON */ = {
isa = PBXGroup;
children = (
9FC4B91F1D2A6F8D0046A641 /* JSON.swift */,
9F27D4631D40379500715680 /* JSONStandardTypeConversions.swift */,
9FEB050C1DB5732300DA3B44 /* JSONSerializationFormat.swift */,
9BA1244922D8A8EA00BF1D24 /* JSONSerialization+Sorting.swift */,
);
Expand Down Expand Up @@ -1705,6 +1707,9 @@
children = (
9FC9A9C11E2D3CAF0023C4D5 /* InputValue.swift */,
DE3C7B15260A6FCA00D2F4FF /* ScalarTypes.swift */,
9FC4B91F1D2A6F8D0046A641 /* JSON.swift */,
9F27D4631D40379500715680 /* JSONStandardTypeConversions.swift */,
DE9C04B026EAAFF900EC35E7 /* JSONDecodingError.swift */,
DE3C7B0F260A6F7F00D2F4FF /* CodegenV1 */,
DE05862426697A8C00265760 /* Info.plist */,
);
Expand Down Expand Up @@ -1791,12 +1796,13 @@
children = (
DE2FCF2226E8082A0057EA67 /* SchemaTypes */,
DE2FCF1E26E807CC0057EA67 /* CacheTransaction.swift */,
DE9C04AE26EAAEE800EC35E7 /* CacheKey.swift */,
9B68F06E241C649E00E97318 /* GraphQLOptional.swift */,
DE3C7B12260A6FC900D2F4FF /* FragmentProtocols.swift */,
DE3C7B14260A6FCA00D2F4FF /* GraphQLEnum.swift */,
DE3C7B11260A6FC900D2F4FF /* ResponseDict.swift */,
DE3C7B10260A6FC900D2F4FF /* SelectionSet.swift */,
DE2FCF1C26E806710057EA67 /* SchemaTypeFactory.swift */,
DE2FCF1C26E806710057EA67 /* SchemaTypeMapper.swift */,
DE664ED326602AF60054DB4F /* Selection.swift */,
DE2FCF2026E807EF0057EA67 /* Cacheable.swift */,
9FC750601D2A59C300458D91 /* GraphQLOperation.swift */,
Expand Down Expand Up @@ -2840,8 +2846,6 @@
9B1CCDD92360F02C007C9032 /* Bundle+Helpers.swift in Sources */,
9B260BF5245A028D00562176 /* HTTPResponse.swift in Sources */,
5AC6CA4322AAF7B200B7C94D /* GraphQLHTTPMethod.swift in Sources */,
DE0586342669956A00265760 /* JSON.swift in Sources */,
DE0586352669956D00265760 /* JSONStandardTypeConversions.swift in Sources */,
9BC742AE24CFB6450029282C /* CacheWriteInterceptor.swift in Sources */,
9B4F453F244A27B900C2CF7D /* URLSessionClient.swift in Sources */,
DE0586332669948500265760 /* InputValue+Evaluation.swift in Sources */,
Expand Down Expand Up @@ -2922,18 +2926,22 @@
DE058609266978A100265760 /* Selection.swift in Sources */,
DE05860A266978A100265760 /* ResponseDict.swift in Sources */,
DE05860B266978A100265760 /* SelectionSet.swift in Sources */,
DE2FCF1D26E806710057EA67 /* SchemaTypeFactory.swift in Sources */,
DE9C04AC26EAAE4400EC35E7 /* JSON.swift in Sources */,
DE2FCF1D26E806710057EA67 /* SchemaTypeMapper.swift in Sources */,
DE2FCF4526E80CF10057EA67 /* GraphQLOperation.swift in Sources */,
DE2FCF2C26E808560057EA67 /* ObjectType.swift in Sources */,
DE05860C266978A100265760 /* FragmentProtocols.swift in Sources */,
DE2FCF2A26E8083A0057EA67 /* Field.swift in Sources */,
DE05860D266978A100265760 /* ScalarTypes.swift in Sources */,
DE9C04AF26EAAEE800EC35E7 /* CacheKey.swift in Sources */,
DE05860E266978A100265760 /* GraphQLOptional.swift in Sources */,
DE2FCF2126E807EF0057EA67 /* Cacheable.swift in Sources */,
DE2FCF1F26E807CC0057EA67 /* CacheTransaction.swift in Sources */,
DE2FCF2826E8083A0057EA67 /* Interface.swift in Sources */,
DE9C04B226EAB02C00EC35E7 /* JSONDecodingError.swift in Sources */,
DE2FCF2926E8083A0057EA67 /* Object.swift in Sources */,
DE058610266978A100265760 /* InputValue.swift in Sources */,
DE9C04AD26EAAE5400EC35E7 /* JSONStandardTypeConversions.swift in Sources */,
DE058616266978A100265760 /* GraphQLEnum.swift in Sources */,
DE2FCF2726E8083A0057EA67 /* Union.swift in Sources */,
);
Expand Down
2 changes: 1 addition & 1 deletion Sources/Apollo/ApolloClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class ApolloClient {

let networkTransport: NetworkTransport

public let store: ApolloStore // <- conformance to ApolloClientProtocol
public let store: ApolloStore

public enum ApolloClientError: Error, LocalizedError {
case noUploadTransport
Expand Down
Loading

0 comments on commit c692d0a

Please sign in to comment.