How to properly query objects with relations and pointers in the data?

	"results": [{
		"objectId": "5j4ix9ZF7D",
		"name": "Vegains",
		"price": 13.95,
		"description": "If you love a dash of spice, this one's for you! Peanut butter, marinated tempeh, courgette noodles, spicy eggplant, spicy broccoli, blistered cherry tomatoes, sesame seeds, and basil lemon vinaigrette",
		"provider": {
			"objectId": "d6Ju7wxJDH",
			"name": "BACK",
			"latitude": "52.369473145575036",
			"longitude": "4.870425927141928",
			"workdayStart": "11:30",
			"workdayFinish": "21:30",
			"url": "Test-URL",
			"createdAt": "2021-12-01T15:13:53.613Z",
			"updatedAt": "2021-12-01T15:13:53.613Z",
			"platform": {
				"__type": "Relation",
				"className": "Platform"
			"__type": "Object",
			"className": "Provider"
		"photo": {
			"__type": "File",
			"name": "1c8569101dfb26d647a1c031e1b7703f_vegains_e-1.jpg",
			"url": "Test-URL"
		"featured": true,
		"createdAt": "2021-12-01T15:57:11.484Z",
		"updatedAt": "2021-12-27T10:30:42.772Z",
		"dietary_preferences": {
			"__type": "Relation",
			"className": "Dietary"
		"tags": {
			"__type": "Relation",
			"className": "Tag"

Considering the above JSON, I’m having a hardship properly writing the query to get the full details of the object instead of the pointer or the relation. I checked the documentation but couldn’t understand. If anyone could help me with this, I’d be very grateful. Thank you!

Can you post the code you tried and whatever errors you received?


There are no errors, I just need the object details of the relations. Following is the code:

    func fetchLikedDishes() throws {
        User.current?.fetch { [weak self] result in
            switch result {
            case .success(let user):

                let dishes = user.likedDishes ?? []
                do {
                    let query = try Dish.query(containedIn(key: "objectId", array: dishes.compactMap { $0.objectId })).includeAll()
                    query.findAll { result in
                        switch result {
                        case .success(let dishes):
                        case .failure(let error):
                } catch let error {
            case.failure(let error):
                debugPrint("Failed fetching liked dishes: \(error.description)")

This looks like the Swift SDK instead of the iOS Objective-C SDK. Can you switch the category?

I’ll see if I can provide some help later on today…

You may need to use the main branch of the SDK. A recent PR may show you how to go about getting your data since you have ParseRelation's:

Couldn’t find where to switch the category but thank you for the information, that’s a great change for sure! Will play around with it.

If you edit the title of this post, you should be able to change it to “ParseSwift SDK”