From a05b33552b58be0e895db6a9e9ccddb2c5f3e3a3 Mon Sep 17 00:00:00 2001 From: Hal Lee Date: Fri, 6 Nov 2020 14:08:57 -0500 Subject: [PATCH] Allow configuration of endpoint for iOS client (#19) --- iOS/QuartzContent/QuartzContentClient.swift | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/iOS/QuartzContent/QuartzContentClient.swift b/iOS/QuartzContent/QuartzContentClient.swift index f2e6a3b4..608b138e 100644 --- a/iOS/QuartzContent/QuartzContentClient.swift +++ b/iOS/QuartzContent/QuartzContentClient.swift @@ -4,8 +4,6 @@ import Foundation public enum QuartzContentClient { - private static let endpoint = URL(string: "https://content.qz.com/graphql")! - private static let name = "content" /// Quartz content GraphQL Apollo client @@ -18,7 +16,8 @@ public enum QuartzContentClient { public static func create( authorization: (() -> String?)?, userAgent: (() -> String?)?, - database: Bool + database: Bool, + endpoint: URL = URL(string: "https://content.qz.com/graphql")! ) throws -> ApolloClient { let cache: NormalizedCache if database {