getAllIntegrations static method

Future<List<GgetAllIntegrationsData_integrations_edges_node>> getAllIntegrations(
  1. Request request, {
  2. Link? graphLink,
})

Implementation

static Future<List<GgetAllIntegrationsData_integrations_edges_node>>
    getAllIntegrations(Request request, {Link? graphLink}) async {
  if (graphLink == null) graphLink = GraphLinkCreator.create(request);
  final req = GgetAllIntegrations();
  final res =
      await graphLink.request(gql.Request(operation: req.operation)).first;
  final errors = res.errors;
  if (errors != null && errors.isNotEmpty) {
    throw errors.first;
  }

  GgetAllIntegrationsData.fromJson(res.data!)!.integrations;
  return GgetAllIntegrationsData.fromJson(res.data!)!
      .integrations
      .edges
      .map((e) => e.node)
      .toList();
}