addEmailOtpAuth method
Implementation
Future addEmailOtpAuth(AuthEmailOtpInput authEmailOtpInput) async {
GraphQLClient _client = graphQLConfiguration.clientToQuery();
var checkPasswordGql = """
mutation addEmailOtpAuth(\$authEmailOtpInput: AuthEmailOtpInput) {
addEmailOtpAuth(authEmailOtpInput: \$authEmailOtpInput) {
emailId
}
}
""";
final vble = {
"authEmailOtpInput": authEmailOtpInput,
};
QueryResult result = await _client.query(QueryOptions(
document: gql(checkPasswordGql),
variables: vble,
fetchPolicy: FetchPolicy.networkOnly,
));
if (!result.hasException) {
var addEmailOtpModel = result.data!['addEmailOtpAuth'];
if (addEmailOtpModel != null) {
addEmailOtp = authEmailOtpInputFromJson(addEmailOtpModel);
return addEmailOtp;
}
}
return addEmailOtp;
}