Closed Routee closed 1 year ago
enum TagType { Default, Private, Global, Abandon; }
const String _createTag = r''' mutation CreateTag( $name: String!, $type: TagType!, $desc: String, ) { createTag(input: { name: $name, type: $type, desc: $desc }) { id name desc type } } ''';
MutationOptions createTag(Map<String, dynamic> variables) => MutationOptions( document: gql(_createTag), variables: variables, onError: (error) { print(variables); print('########'); print(error); });
### it print the errors below
I/flutter (11467): {name: jj, desc: s, type: Default} I/flutter (11467): ######## I/flutter (11467): OperationException(linkException: ResponseFormatException(originalException: type 'Null' is not a subtype of type 'String' in type cast, originalStackTrace: #0 ResponseParser.parseError (package:gql_link/src/response_parser.dart:29:35) I/flutter (11467): #1 ResponseParser.parseResponse.<anonymous closure> (package:gql_link/src/response_parser.dart:13:34) I/flutter (11467): #2 MappedListIterable.elementAt (dart:_internal/iterable.dart:415:31) I/flutter (11467): #3 ListIterator.moveNext (dart:_internal/iterable.dart:344:26) I/flutter (11467): #4 new _GrowableList._ofEfficientLengthIterable (dart:core-patch/growable_array.dart:189:27) I/flutter (11467): #5 new _GrowableList.of (dart:core-patch/growable_array.dart:150:28) I/flutter (11467): #6 new List.of (dart:core-patch/array_patch.dart:47:28) I/flutter (11467): #7 ListIterable.toList (dart:_internal/iterable.dart:214:7) I/flutter (11467): #8 ResponseParser.parseResponse (package:gql_link/src/response_parser.dart:15:14) I/flutter (11467): #9 HttpLink._parseHttpResponse (package:gql_http_link/src/link.dart:118:21) I/flutter (11467): <asynchronous suspension> I/flutter (11467): #10 HttpLink.request (package:gql_ht
### it works on altair graphql client
### it print the errors below
### it works on altair graphql client