Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subscription filter has invalid filter value for operator containsAny #2547

Open
lawmicha opened this issue May 10, 2024 · 1 comment
Open
Labels
api-graphql bug Something isn't working

Comments

@lawmicha
Copy link
Member

          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 aws-amplify/amplify-swift#3134 (comment). 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 aws-amplify/amplify-swift#3134 (comment)

@lawmicha
Copy link
Member Author

if we look at the orginal issue description, aws-amplify/amplify-swift#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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-graphql bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants