Skip to content

Instantly share code, notes, and snippets.

@ebubekirsezer
Created October 19, 2022 20:18
Show Gist options
  • Save ebubekirsezer/aef75bac99a379f8b8daab88a08ca0f5 to your computer and use it in GitHub Desktop.
Save ebubekirsezer/aef75bac99a379f8b8daab88a08ca0f5 to your computer and use it in GitHub Desktop.
import Foundation
import Apollo
protocol NetworkManagerProtocol {
var service: ApolloClient { get set }
func queryGraphQLRequest<T: GraphQLQuery, K: Codable>(query: T, responseModel: K.Type, completion: @escaping ((Result<K, Error>) -> Void))
func performGraphQLRequest<T: GraphQLMutation, K: Codable>(mutation: T, responseModel: K.Type, completion: @escaping ((Result<K, Error>) -> Void))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment