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

make parts of GraphQLGetTransformer and MultipartFormData public #1273

Merged
merged 1 commit into from
Jun 29, 2020
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
6 changes: 3 additions & 3 deletions Sources/Apollo/GraphQLGETTransformer.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation

struct GraphQLGETTransformer {
public struct GraphQLGETTransformer {

let body: GraphQLMap
let url: URL
Expand All @@ -10,15 +10,15 @@ struct GraphQLGETTransformer {
/// - Parameters:
/// - body: The GraphQLMap to transform from the body of a `POST` request
/// - url: The base url to append the query to.
init(body: GraphQLMap, url: URL) {
public init(body: GraphQLMap, url: URL) {
self.body = body
self.url = url
}

/// Creates the get URL.
///
/// - Returns: [optional] The created get URL or nil if the provided information couldn't be used to access the appropriate parameters.
func createGetURL() -> URL? {
public func createGetURL() -> URL? {
guard var components = URLComponents(string: self.url.absoluteString) else {
return nil
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/Apollo/MultipartFormData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class MultipartFormData {
/// A Carriage Return Line Feed character, which will be seen as a newline on both unix and Windows servers.
static let CRLF = "\r\n"

let boundary: String
public let boundary: String

private var bodyParts: [BodyPart]

Expand Down Expand Up @@ -89,7 +89,7 @@ public class MultipartFormData {
/// Encodes everything into the final form data to send to a server.
///
/// - Returns: The final form data to send to a server.
func encode() throws -> Data {
public func encode() throws -> Data {
var data = Data()

for p in self.bodyParts {
Expand Down