Closed MrFarhan closed 1 year ago
Can you share your integration code?
@mhd999 I have used the exact same code you mentioned in the readme
Below is the code screenshot, I think we need to wrap this in Future builder or Stream to get the subscription data but I couldn't find any of them in your code, Pls correct me if I am wrong or made any mistake in the code :
Can you share the result of
curl --location --request POST 'https://XXXXXX.appsync-api.{REGION}.amazonaws.com/graphql' \
--header 'x-api-key: {API_KEY}' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"subscription {\n onCreateOrder {\n OrdersId\n }\n}","variables":{}}'
Got below error while using your code with my subscription.
flutter: NoSuchMethodError: The method '[]' was called on null. Receiver: null Tried calling: []("subscription")
I had to decline the project due to this issue, how ever the error while calling subscription is mentioned in my initial message
Hi,
the curl I shared in the previous comment should return a response similar to this:
"extensions": {
"subscription": {
"mqttConnections": [...],
"newSubscriptions" : { ... }
}
}
I don't think your AWS AppSync returns this response hence why the library can't parse the response to find the subscription topic.
If you are not able to share that response with me I can't debug the issue.
Hello, I'm facing this error
{ "errors" : [ { "errorType" : "BadRequestException", "message" : "Subscriptions over MQTT is not supported." } ] }
Got below error while using your code with my subscription.
flutter: NoSuchMethodError: The method '[]' was called on null. Receiver: null Tried calling: []("subscription")