 		// Fields
 		for (resourceType, fields) in self.fields {
 			var item = NSURLQueryItem(name: "fields[\(resourceType)]", value: (fields as NSArray).componentsJoinedByString(","))
+			queryItems.append(item)
+		}
+		
+		// Sorting
+		if self.sortOrders.count != 0 {
+			var item = NSURLQueryItem(name: "sort", value: (self.sortOrders as NSArray).componentsJoinedByString(","))
 			queryItems.append(item)
 		}
 		

	}
	
	
	// MARK: URL building
	
	/**

	private var includes: [String] = []
	private var filters: [QueryFilter] = []
	private var fields: [String: [String]] = [:]
	private var sortOrders: [String] = []
	
	// Pagination parts. These are scoped internal so they can be accessed by the Paginator class.
	internal var page: Int?
