We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb001b4 commit d290b27Copy full SHA for d290b27
packages/amplify_core/lib/src/types/api/graphql/graphql_response.dart
@@ -33,10 +33,10 @@ class GraphQLResponse<T> {
33
34
@override
35
String toString() {
36
- if (hasErrors) {
37
- final errors = this.errors.map((error) => error.toJson()).toList();
38
- return 'GraphQLResponse<$T> error: ${prettyPrintJson(errors)}';
39
- }
40
- return 'GraphQLResponse<$T> success: ${prettyPrintJson(data)}';
+ final obj = {
+ 'data': data,
+ 'errors': errors,
+ };
+ return 'GraphQLResponse<$T>: ${prettyPrintJson(obj)}';
41
}
42
0 commit comments