Open Routee opened 1 year ago
i called the createTag in another file like this
import 'package:sparrow/network/graphql/tag/tag.dart' as client;
class TagController extends GetxController {
void newTag() async {
... some code ...
MutationOptions options = client.createTag(tagInput.value.toJson());
var queryResult = await GraphQLProvider.of(context).value.mutate(options);
}
}
this problems resolved when i modify the import name from
import 'package:sparrow/network/graphql/tag/tag.dart' as client;
to
import 'package:sparrow/network/graphql/tag/tag.dart' as tagClient;
when i rollback the tagClient
to 'client', the exception was gone!!!
looks like some cache problems.
if the backend throw a custom exception which message is null. this line: error['message'] as String will throw an excption. it's not the expected.
### it print the errors below
### it works on altair graphql client