generateAccountUrl static method
Implementation
static Future<String> generateAccountUrl(
String integrationId, Request request,
{Link? graphLink}) async {
if (graphLink == null) graphLink = GraphLinkCreator.create(request);
final req = GgenerateAccountLinkingUrl(
(b) => b..vars.integrationId = integrationId);
final res = await graphLink
.request(
gql.Request(operation: req.operation, variables: req.vars.toJson()))
.first;
final errors = res.errors;
if (errors != null && errors.isNotEmpty) {
throw errors.first;
}
return GgenerateAccountLinkingUrlData.fromJson(res.data!)!
.generateAccountLinkingUrl
.url;
}