Avoiding Duplicates & Ensuring Uniqueness with Mutations

I have a schema as follows:

type Person {
	id: ID!
	name: String!
	interests: [Interest!] @relation(name: "INTEREST", direction: "OUT")
}

type Interest {
	id: ID!
	interest: String!
	people_with_interest: [Person!] @relation(name: "INTEREST", direction: "IN")
}

When I call the mutation:

AddPersonInterests(from:$person, to:$interest) {
    to {
      id
    }
    from {
      id
    }
  }

multiple times with the same Person/Interest it creates duplicate edges.

How can I avoid duplicate edges being created? Additionally, is there a way to delete all interests for a given person in this example? Thank you!