62. Mutation: Share Farms
Batch farms sharing to users inside "Organization" or for external users. There are two cases to apply mutation. The first case is batch "Farm" sharing by email list.
mutation ShareFarmsSample {
shareFarms(
input: {
farmUuids: ["farm_uuid1", "farm_uuid2"]
emails: ["user1@gmail.com", "user2@gmail.com"]
}
) {
uuid
userUuid
name
farmOwnership
createdDate
updatedDate
email
}
}
And the second case is to set up the flag ‘allFarms=true’ for the list of "Users" in the "Organization", which means all new farms inside the "Organization" will be accessible for these "Users".
mutation ShareFarmsSample {
shareFarms(
input: {
emails: ["user@gmail.com"],
allFarms: true
}
) {
uuid
userUuid
name
farmOwnership
createdDate
updatedDate
email
}
}
Last updated
Was this helpful?