DataStore.observequery does not return nested belongsTo fields, but DataStore.query does. #10211
Closed
3 tasks done
Labels
DataStore
Related to DataStore category
Expo
For issues where expo is in use
React Native
React Native related issue
Before opening, please confirm:
JavaScript Framework
React Native
Amplify APIs
DataStore
Amplify Categories
api
Environment information
Describe the bug
DataStore.observequery
is not returning belongsto items.Expected behavior
I expect the belongsto (message) field to be populated in the observequery response, as it is in the query response.
Reproduction steps
My (relevant) models look like this:
If i run this query
I get this response
but with observequery: (same filter, same model)
I get this response:
Am i doing something wrong? or is this expected behavior?
oddly, if I
query
first then runobservequery
, the response has thebelongsto
messages. But any subsequent messageRecipients created that trigger the observequery listener do not have thebelongsto
message reference.The text was updated successfully, but these errors were encountered: