Open
Description
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.
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)