GeoPard Tutorials
Ask or search…
K

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.
1
mutation ShareFarmsSample {
2
shareFarms(
3
input: {
4
farmUuids: ["farm_uuid1", "farm_uuid2"]
6
}
7
) {
8
uuid
9
userUuid
10
name
11
farmOwnership
12
createdDate
13
updatedDate
14
email
15
}
16
}
17
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".
1
mutation ShareFarmsSample {
2
shareFarms(
3
input: {
4
emails: ["[email protected]"],
5
allFarms: true
6
}
7
) {
8
uuid
9
userUuid
10
name
11
farmOwnership
12
createdDate
13
updatedDate
14
email
15
}
16
}