File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
packages/api/amplify_api_dart
lib/src/graphql/web_socket/types Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ abstract class WebSocketMessagePayload {
61
61
MessageType .connectionAck: ConnectionAckMessagePayload .fromJson,
62
62
MessageType .data: SubscriptionDataPayload .fromJson,
63
63
MessageType .error: WebSocketError .fromJson,
64
+ MessageType .connectionError: WebSocketError .fromJson,
64
65
};
65
66
66
67
static WebSocketMessagePayload ? fromJson (
Original file line number Diff line number Diff line change @@ -65,6 +65,21 @@ void main() {
65
65
},
66
66
MessageType .error,
67
67
),
68
+ MessageTypeTestEntry (
69
+ {
70
+ 'id' : 'abc-456' ,
71
+ 'type' : 'connection_error' ,
72
+ 'payload' : {
73
+ 'errors' : [
74
+ {
75
+ 'errorType' : 'UnknownConnectionError' ,
76
+ 'message' : 'Unknown connection id abc-456' ,
77
+ }
78
+ ],
79
+ },
80
+ },
81
+ MessageType .connectionError,
82
+ ),
68
83
];
69
84
70
85
group ('WebSocketMessage should create expected messages from JSON' , () {
You can’t perform that action at this time.
0 commit comments