You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DataStore translates the syncExpression over to the filter predicate on the GrapQL query. When DataStore performs a sync query, the filter is added, to perform server side filtering. When DataStore establishes the subscriptions, the filtering is applied on the client side.Since the subscription filtering feature released in April 2022, customers can provision AppSync with the filter input capability on their subscription operations. DataStore can now leverage this by passing in filter to the subscription request.
We attempt the subscription with the filter and catch ther error
Handle the specific "RTF" error as a retry without the filter for backwards compatibility.
The text was updated successfully, but these errors were encountered:
lawmicha
changed the title
DataStore to perform Subscription Server side filtering
DataStore to perform Subscription with server-side filtering
Mar 7, 2024
This issue was opened by a maintainer of this repository; updates will be posted here. If you are also experiencing this issue, please comment here with any relevant information so that we're aware and can prioritize accordingly.
lawmicha
changed the title
DataStore to perform Subscription with server-side filtering
DataStore to establish Subscription with server-side filtering
Mar 7, 2024
DataStore translates the
syncExpression
over to thefilter
predicate on the GrapQL query. When DataStore performs a sync query, the filter is added, to perform server side filtering. When DataStore establishes the subscriptions, the filtering is applied on the client side.Since the subscription filtering feature released in April 2022, customers can provision AppSync with thefilter
input capability on their subscription operations. DataStore can now leverage this by passing infilter
to the subscription request.References
https://github.com/aws-amplify/amplify-js/blob/main/packages/datastore/src/sync/processors/subscription.ts#L467-L492
https://github.com/aws-amplify/amplify-js/blob/main/packages/datastore/src/sync/processors/subscription.ts#L677-L682C10
This logic allows for backwards compatibility with AppSync backends without the subscription
filter
capability.Originally posted by @lawmicha in aws-amplify/amplify-swift#3550 (comment)
The text was updated successfully, but these errors were encountered: