deleteFromMany method

Future<RelationshipUpdated<Relationship>> deleteFromMany(
  1. String type,
  2. String id,
  3. String relationship,
  4. List<Identifier> identifiers, {
  5. Map<String, Object?> meta = const {},
  6. Map<String, List<String>> headers = const {},
})

Deletes the identifiers from the to-many relationship identified by type, id, relationship.

Optional arguments:

  • headers - any extra HTTP headers
  • meta - relationship meta data

Implementation

Future<RelationshipUpdated> deleteFromMany(
  String type,
  String id,
  String relationship,
  List<Identifier> identifiers, {
  Map<String, Object?> meta = const {},
  Map<String, List<String>> headers = const {},
}) async =>
    RelationshipUpdated.many(await send(
        _baseUri.relationship(type, id, relationship),
        Request.delete(
            OutboundDataDocument.many(ToMany(identifiers)..meta.addAll(meta)))
          ..headers.addAll(headers)));