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

Replace class constraint with AnyObject #1733

Merged
merged 1 commit into from
Mar 26, 2021
Merged
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
2 changes: 1 addition & 1 deletion Sources/Apollo/ApolloClientProtocol.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation

/// The `ApolloClientProtocol` provides the core API for Apollo. This API provides methods to fetch and watch queries, and to perform mutations.
public protocol ApolloClientProtocol: class {
public protocol ApolloClientProtocol: AnyObject {

/// A store used as a local cache.
var store: ApolloStore { get }
Expand Down
2 changes: 1 addition & 1 deletion Sources/Apollo/ApolloInterceptor.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// A protocol to set up a chainable unit of networking work.
public protocol ApolloInterceptor: class {
public protocol ApolloInterceptor: AnyObject {

/// Called when this interceptor should do its work.
///
Expand Down
2 changes: 1 addition & 1 deletion Sources/Apollo/ApolloStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func rootCacheKey<Operation: GraphQLOperation>(for operation: Operation) -> Stri
}
}

protocol ApolloStoreSubscriber: class {
protocol ApolloStoreSubscriber: AnyObject {

/// A callback that can be received by subscribers when keys are changed within the database
///
Expand Down
2 changes: 1 addition & 1 deletion Sources/Apollo/Cancellable.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation

/// An object that can be used to cancel an in progress action.
public protocol Cancellable: class {
public protocol Cancellable: AnyObject {
/// Cancel an in progress action.
func cancel()
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Apollo/GraphQLOperation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ public enum GraphQLOperationType {
case subscription
}

public protocol GraphQLOperation: class {
public protocol GraphQLOperation: AnyObject {
var operationType: GraphQLOperationType { get }

var operationDefinition: String { get }
Expand Down
2 changes: 1 addition & 1 deletion Sources/Apollo/GraphQLResultAccumulator.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
protocol GraphQLResultAccumulator: class {
protocol GraphQLResultAccumulator: AnyObject {
associatedtype PartialResult
associatedtype FieldEntry
associatedtype ObjectResult
Expand Down
2 changes: 1 addition & 1 deletion Sources/Apollo/NetworkTransport.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation

/// A network transport is responsible for sending GraphQL operations to a server.
public protocol NetworkTransport: class {
public protocol NetworkTransport: AnyObject {

/// Send a GraphQL operation to a server and return a response.
///
Expand Down
2 changes: 1 addition & 1 deletion Sources/ApolloTestSupport/TestCacheProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import XCTest
public typealias TearDownHandler = () throws -> ()
public typealias TestDependency<Resource> = (Resource, TearDownHandler?)

public protocol TestCacheProvider: class {
public protocol TestCacheProvider: AnyObject {
static func makeNormalizedCache(_ completionHandler: (Result<TestDependency<NormalizedCache>, Error>) -> ())
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/ApolloWebSocket/WebSocketTransport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Foundation

// MARK: - Transport Delegate

public protocol WebSocketTransportDelegate: class {
public protocol WebSocketTransportDelegate: AnyObject {
func webSocketTransportDidConnect(_ webSocketTransport: WebSocketTransport)
func webSocketTransportDidReconnect(_ webSocketTransport: WebSocketTransport)
func webSocketTransport(_ webSocketTransport: WebSocketTransport, didDisconnectWithError error:Error?)
Expand Down