 }
 
 extension String: GraphQLSerializable {
-  
+
   var asGraphQLString: String {
     return "\"" + escape(string: self) + "\""
   }
-  
+
   /// Escape strings according to https://facebook.github.io/graphql/#sec-String-Value
   private func escape(string input: String) -> String{
     var output = ""

extension Array: GraphQLSerializable {

  var asGraphQLString: String {
    let output = self.map { element in
      if let element = element as? GraphQLSerializable {
        return element.asGraphQLString
      } else {

        output.append(Character(scalar))
      }
    }

    return output
  }

}

extension Dictionary: GraphQLSerializable {

  var asGraphQLString: String {
    let output = map { key, value in
      let serializedValue: String
      if let value = value as? GraphQLSerializable {
        serializedValue = value.asGraphQLString
      } else {
        serializedValue = "\(value)"
      }

      return "\(key): \(serializedValue)"
      }.joined(separator: ",")

    return "{\(output)}"
  }

