Hi there!
I’m using this query to add a document:
mutation CreateOrganization {
createOrganization(data: {
organizationType: CLIENT_ORGANIZATION,
name: "Candy Co",
description: "Making the world a better place",
defaultLanguage: "en",
defaultTimezone: "America/New_York",
provider: {
connect: "284109474703081989"
},
}) {
_id
}
}
I’m getting this error:
{
"errors": [
{
"message": "Instance is not unique.",
"extensions": {
"code": "instance not unique"
}
}
]
}
Here is my schema for the Organization
Type:
type Organization @collection(name: "organizations") {
organizationType: OrganizationType!
name: String!
description: String
logo: String
defaultLanguage: String
defaultTimezone: String
availableLabels: [String]
availableFocusAreas: [FocusArea!]
# ClientOrganization or CoachOrganization
provider: Organization
# ClientOrganization
clients: [User!] @relation(name: "organization_clients")
availableCoaches: [User!] @relation(name: "organization_available_coaches")
# CoachOrganization
coaches: [User!] @relation(name: "organization_coaches")
# ProviderOrganization
providerOrgUsers: [User!] @relation(name: "user_providerOrganization")
}
As you can see, there are no uniqueness constraints on any of the fields.
Any help with getting this issue resolved would be greatly appreciated.
Thanks in advance