Can't fetch objects with Pointers

In your Library struct, name should be optional, and in Recipe, title should be optional. When they are not optionals you are saying, “these keys are required for decoding”. A “parse pointer” will never contain those keys:


"library": {
        "__type": "Pointer",
        "className": "Library",
        "objectId": "m8WNpqBgeD"
      },

Of course, your original query will work (without using optionals) if you add .includAll or .include(“library”) to the end of it as the the full contents library will be fetched instead of a pointer to it.

It’s recommended to make all your keys optionals if you expect to have those objects pointed to at some point in the future. You can ensure they “act” as required through your initializers.