diff --git a/Sources/ApolloSQLite/SQLiteNormalizedCache.swift b/Sources/ApolloSQLite/SQLiteNormalizedCache.swift index e66d438f3d..72fedb7de0 100644 --- a/Sources/ApolloSQLite/SQLiteNormalizedCache.swift +++ b/Sources/ApolloSQLite/SQLiteNormalizedCache.swift @@ -24,7 +24,7 @@ public final class SQLiteNormalizedCache: NormalizedCache { return Promise { let records = try selectRecords(forKeys: keys) let recordsOrNil: [Record?] = keys.map { key in - if let recordIndex = records.index(where: { $0.key == key }) { + if let recordIndex = records.firstIndex(where: { $0.key == key }) { return records[recordIndex] } return nil