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

graphql-ws subscription behaviour is not compatible with AWS api. #602

Closed
ret-smart opened this issue Dec 3, 2024 · 1 comment
Closed
Labels
duplicate This issue or pull request already exists

Comments

@ret-smart
Copy link

ret-smart commented Dec 3, 2024

Screenshot
i set a console.log at validateMessage:

"id": "5c87a716-0053-4755-b949-ef2cdf1d038c",
  "type": "subscribe",
  "payload": {
    "query": "subscription OnUpdateDatapoint {\n        onUpdateDatapoint {\n            id\n            value\n        }\n    }",
    "variables": {},
    "extensions": {
      "authorization": {
        "host": "XXXX.appsync-api.eu-west-1.amazonaws.com",
        "authorization": "Bearer Token"
      }
    }
  }
}
message= {
  "type": "ka"
}
message= {
  "type": "error",
  "payload": {
    "errors": [
      {
        "errorType": "UnsupportedOperation",
        "message": "unknown not supported through the realtime channel"
      }
    ]
  }
}

Error: Error: "error" message expects the 'id' property to be a string, but got undefined

Expected Behaviour
[https://docs.aws.amazon.com/en_us/appsync/latest/devguide/real-time-websocket-client.html]
i checked the websocket environment with this specification and it has worked with wscat.

the ka message leads to an error.

Actual Behaviour
I checked the source code the i saw tht the component uses other requests than AWS does.

Debug Information
create an AWS amplify api and check subscription.

Further Information
I can send my source code, if requested.

@enisdenjo
Copy link
Owner

Duplicate of #241.

@enisdenjo enisdenjo closed this as not planned Won't fix, can't repro, duplicate, stale Dec 18, 2024
@enisdenjo enisdenjo added the duplicate This issue or pull request already exists label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants