# 62. Mutācija: kopīgot saimniecības

Partiju saimniecību koplietošana lietotājiem organizācijas ietvaros vai ārējiem lietotājiem. Ir divi gadījumi, kuros piemēro mutāciju. Pirmais gadījums ir partiju "Saimniecību" koplietošana pēc e‑pasta saraksta.

{% code overflow="wrap" lineNumbers="true" %}

```graphql
mutācija ShareFarmsSample {
  shareFarms(
    ievade: {
      farmUuids: ["farm_uuid1", "farm_uuid2"]
      emails: ["user1@gmail.com", "user2@gmail.com"]
    }
  ) {
    uuid
    userUuid
    nosaukums
    farmOwnership
    izveidesDatums
    updatedDate
    e-pasts
  }
}

```

{% endcode %}

Un otrais gadījums ir iestatīt karodziņu ‘allFarms=true’ lietotāju sarakstam organizācijā, kas nozīmē, ka visām jaunajām saimniecībām organizācijas ietvaros šie lietotāji iegūs piekļuvi.

{% code overflow="wrap" lineNumbers="true" %}

```graphql
mutācija ShareFarmsSample {
  shareFarms(
    ievade: { 
      emails: ["user@gmail.com"], 
      allFarms: true 
    }
  ) {
    uuid
    userUuid
    nosaukums
    farmOwnership
    izveidesDatums
    updatedDate
    e-pasts
  }
}
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.geopard.tech/geopard-tutorials/lva/api-dokumentacija/geopard-api-pieprasijumu-parskats/62.-mutacija-kopigot-saimniecibas.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
