ashutosh1206/fargraph

MERGE fails when one of the properties has a UNIQUE constraint and the other property changes

ashutosh1206 opened this issue · 0 comments

From: https://neo4j.com/blog/common-confusions-cypher/

Screenshot 2023-08-29 at 8 10 31 PM

FIDs have a UNIQUE constraint on them in fargraph since they uniquely identify a user. But we also store the corresponding username in a User node. This error is triggered in fargraph now that users are allowed to have ENS usernames: farcasterxyz/protocol#90, if:

  1. There's existing data in neo4j
  2. A User node that previously existed in the graph changed their username
  3. Fargraph tries to re-merge a node with this FID into the graph when you rerun the fargraph script