amplify-category-api
amplify-category-api copied to clipboard
subscription filter has invalid filter value for operator `containsAny`
The first error is infact from the subscription request.
I was able to replay the request in the AppSync console to produce the error, even without any filters (would have been the syncExpression at the DataStore client).
For the schema in https://github.com/aws-amplify/amplify-swift/issues/3134#issuecomment-1679194276. The LmShot model subscription request:
subscription OnDeleteLmShot($owner: String!) {
onDeleteLmShot(owner: $owner) {
id
apex
apexValid
attackAngle
attackAngleValid
ballCurve
ballDirection
ballSpeed
ballSpeedValid
carryDistance
carryDistanceValid
clubCategory
clubId
clubPath
clubPathValid
clubSpeed
clubSpeedValid
createdAt
faceAngle
faceAngleValid
groups
horizontalLaunchAngle
horizontalLaunchAngleValid
impactKey
isFavorite
launchAngle
launchAngleValid
lmSessionId
normalizedValues {
apex
carryDistance
side
sideTotal
totalDistance
__typename
}
owner
pointCloudKey
pointId
protobufKey
side
sideTotal
sideTotalValid
sideValid
smashFactor
smashFactorValid
spinAxis
spinAxisValid
spinRate
spinRateValid
timestamp
totalDistance
totalDistanceValid
updatedAt
videoKey
xFit
yFit
zFit
club {
id
brand
createdAt
isActive
listOrder
lmProfileId
model
name
owner
shaft
type
updatedAt
__typename
_version
_deleted
_lastChangedAt
}
__typename
_version
_deleted
_lastChangedAt
}
}
variables contains the username that I signed in with.
{
"owner": "mchael"
}
Response:
{
"errors": [
{
"message": "Connection failed: {\"errors\":[{\"message\":\"subscription filter has invalid filter value for operator `containsAny`.\",\"errorCode\":400}]}"
}
]
}
AppSync was provisioned with Amplify CLI version 12.10.3, transformer v2, DataStore enabled.
Originally posted by @lawmicha in https://github.com/aws-amplify/amplify-swift/issues/3134#issuecomment-2105004982
if we look at the orginal issue description, https://github.com/aws-amplify/amplify-swift/issues/3134
there's logs that indicate [] being passed to groups.containsAny
"filter": {
"or": [
{
"owner": {
"eq": "XXX"
}
},
{
"groups": {
"containsAny": []
}
}
]
}
This looks like it is related to the root cause of this issue