Unique Constraint on string

Yes. Read the link I’ve shared. The response is there. " Running an Upsert: Query + Mutation"

If you need a condition running-conditional-upsert.