amplify-swift: AppSyncRealTimeClient Subscription events failing
Describe the bug
Moving to GraphQL transformer v2, now getting this error when running our app against the newly deployed backend.
GraphQLResponseError<MutationSync<AnyModel>>: GraphQL service returned a successful response containing errors: [Amplify.GraphQLError(message: "subscription filter has invalid filter value for operator `containsAny`.", locations: nil, path: nil, extensions: Optional(["errorCode": Amplify.JSONValue.number(400.0)]))]```
We added group list authorization as well as our owner authorization. The group authorization is meant to be optional, where we enable it as needed. However this seems to be incurring an error from the resolvers. I’m not sure this is exactly where the error is, I’m just getting this error on the swift client and not seeing any errors when enabling logging on the AppSync API. See log output below for (potentially) relevant request mapping log output.
Steps To Reproduce
Steps to reproduce the behavior:
1. Add @auth rule for groups with groupsField
2. Deploy changes to backend
3. Run app client
4. See error
Expected behavior
App sync continues to work after graphQL changes
Amplify Framework Version
1.30.4
Amplify Categories
API
Dependency manager
Cocoapods
Swift version
5.8.1
CLI version
12.2.4
Xcode version
15.0 b2
Relevant log output
<details>
<summary>Log Messages</summary>
{
"logType": "RequestMapping",
"fieldName": "onUpdateLmShot",
"resolverArn": "arn:aws:appsync:us-east-1:XXX:apis/XXX/types/Subscription/resolvers/onUpdateLmShot",
"functionName": "SubscriptiononCreateLmSessionauth0Function",
"fieldInError": false,
"parentType": "Subscription",
"path": [
"onUpdateLmShot"
],
"requestId": "455faac6-4829-4e57-9b69-2b1092578056",
"context": {
"arguments": {
"owner": "XXX",
"filter": {
"or": [
{
"owner": {
"eq": "XXX"
}
},
{
"groups": {
"containsAny": []
}
}
]
}
},
"prev": {
"result": {}
},
"stash": {
"authRole": "arn:aws:sts::XXX:assumed-role/amplify-XXX-prod-XXX-authRole/CognitoIdentityCredentials",
"conditions": [],
"connectionAttributes": {},
"fieldName": "onUpdateLmShot",
"hasAuth": true,
"metadata": {
"dataSourceType": "NONE",
"apiId": "XXX"
},
"typeName": "Subscription",
"unauthRole": "arn:aws:sts::XXX:assumed-role/amplify-XXX-prod-X-unauthRole/CognitoIdentityCredentials"
},
"outErrors": []
},
"errors": [],
"graphQLAPIId": "XXX",
"functionArn": "arn:aws:appsync:us-east-1:XXX:apis/XXX/functions/XXX",
"transformedTemplate": "\n \n \n \n \n \n {\"version\":\"2018-05-29\",\"payload\":{}}\n"
}
```
Is this a regression?
No
Regression additional context
No response
Platforms
iOS
OS Version
iOS 16.6
Device
iPhone 13 Pro max
Specific to simulators
No response
Additional context
No response
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 15 (7 by maintainers)
@ChadyG
Thanks for providing the information. Our team is actively prioritizing and working on issues. We will provide an update as soon as we have one on the issue.