Skip to content

Commit 56072f0

Browse files
Merge pull request #1010 from apollographql/fix/cache
Don't run in-memory cache tests during SQLite cache testing
2 parents 9f8fe8a + 27d07f6 commit 56072f0

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

Tests/ApolloCacheDependentTests/FetchQueryTests.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,9 @@ class FetchQueryTests: XCTestCase {
385385
}
386386

387387
func testThreadedCache() throws {
388+
#if canImport(ApolloSQLite)
389+
print("THIS ONLY TESTS THE IN-MEMORY CACHE")
390+
#else
388391
let cache = InMemoryNormalizedCache()
389392

390393
let networkTransport1 = MockNetworkTransport(body: [
@@ -476,5 +479,6 @@ class FetchQueryTests: XCTestCase {
476479
for watcher in watchers {
477480
watcher.cancel()
478481
}
482+
#endif
479483
}
480484
}

Tests/StarWarsAPI/API.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5558,7 +5558,7 @@ public final class StarshipQuery: GraphQLQuery {
55585558

55595559
public final class StarshipCoordinatesQuery: GraphQLQuery {
55605560
/// The raw GraphQL definition of this operation.
5561-
public let operationDefinition =
5561+
public let operationDefinition: String =
55625562
"""
55635563
query StarshipCoordinates($coordinates: [[Float!]!]) {
55645564
starshipCoordinates(coordinates: $coordinates) {
@@ -5570,7 +5570,7 @@ public final class StarshipCoordinatesQuery: GraphQLQuery {
55705570
}
55715571
"""
55725572

5573-
public let operationName = "StarshipCoordinates"
5573+
public let operationName: String = "StarshipCoordinates"
55745574

55755575
public let operationIdentifier: String? = "8dd77d4bc7494c184606da092a665a7c2ca3c2a3f14d3b23fa5e469e207b3406"
55765576

@@ -5585,7 +5585,7 @@ public final class StarshipCoordinatesQuery: GraphQLQuery {
55855585
}
55865586

55875587
public struct Data: GraphQLSelectionSet {
5588-
public static let possibleTypes = ["Query"]
5588+
public static let possibleTypes: [String] = ["Query"]
55895589

55905590
public static let selections: [GraphQLSelection] = [
55915591
GraphQLField("starshipCoordinates", arguments: ["coordinates": GraphQLVariable("coordinates")], type: .object(StarshipCoordinate.selections)),
@@ -5611,7 +5611,7 @@ public final class StarshipCoordinatesQuery: GraphQLQuery {
56115611
}
56125612

56135613
public struct StarshipCoordinate: GraphQLSelectionSet {
5614-
public static let possibleTypes = ["Starship"]
5614+
public static let possibleTypes: [String] = ["Starship"]
56155615

56165616
public static let selections: [GraphQLSelection] = [
56175617
GraphQLField("__typename", type: .nonNull(.scalar(String.self))),

0 commit comments

Comments
 (0)