There is no concept of multifield unique key at the moment in Dgraph. The @id only keeps the values unique for that single field. So you cannot have more than one node with the same week even if the domain is different, and you cannot have more than one node with the same domain even if the week is different. If this is what you need, then you will have to add that logical key as a new field domainWeek: String @id and then manually concatenate the values and add them into that field when inserting data.
1 Like