<p>Aha, it was merely sending in <code>siteId</code> as well when updating, in addition to <code>id</code>. If siteId is missing, it will default to primary site it seems.</p>

CC BY-SA 4.0
2021-03-09T12:54:19.790Z
2021-03-09T12:54:19.790Z
jishi
<p>Is there a restriction on graphQL that only allows it to work on the primary site?</p>
<p>My system has for unknown reason switched primary (and I can't change it back due to a bug), and ever since then my graphQL mutation fails claiming there is no such entry (switching primary in my dev env fizes the problem).</p>
<p>I figured that the base URL of the api request controlled which site it was querying, but that doesn't seem to be the case either?</p>
<p>I'm using the mutation <code>save_sectionHandle_entryTypeHandle_Entry()</code>. The ID I send in seems to be the same across different sites, so I need some way to distinguish between them to edit the right entry it seems, or in my case, allowing the call to even find the entry...</p>

<multi-site><graphql>
GraphQL mutation or query, how to target specific site?
# GraphQL mutation or query, how to target specific site?

(Asked by: username_0 on 2021-03-09)

Is there a restriction on graphQL that only allows it to work on the primary site?

My system has for unknown reason switched primary (and I can't change it back due to a bug), and ever since then my graphQL mutation fails claiming there is no such entry (switching primary in my dev env fizes the problem).

I figured that the base URL of the api request controlled which site it was querying, but that doesn't seem to be the case either?

I'm using the mutation `save_sectionHandle_entryTypeHandle_Entry()`. The ID I send in seems to be the same across different sites, so I need some way to distinguish between them to edit the right entry it seems, or in my case, allowing the call to even find the entry...

**Tags:** multi-site, graphql


---

## 1 answers

### Answer by username_0 on 2021-03-09. Score: 1

Aha, it was merely sending in `siteId` as well when updating, in addition to `id`. If siteId is missing, it will default to primary site it seems.


---

