This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Apollo | |
import Combine | |
/// Extending ApolloClient to provide a convenient entry point for the publishers | |
/// I tried to stay as close as possible to the signature of the associated Apollo function calls | |
extension ApolloClient { | |
func queryPublisher<Query: GraphQLQuery>(_ query: Query, | |
cachePolicy: CachePolicy? = nil, | |
context: UnsafeMutableRawPointer? = nil, | |
queue: DispatchQueue? = .main) -> Publishers.ApolloQuery<Query> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DTTapTempo { | |
private let timeOutInterval: NSTimeInterval | |
private let minTaps: Int | |
private var taps: [NSDate] = [] | |
init(timeOut: NSTimeInterval, minimumTaps: Int) { | |
timeOutInterval = timeOut | |
minTaps = minimumTaps | |
} | |