MutacjaBetaMutation.updateClient
Changes a client: a field left out keeps its value, null clears a field that may be empty. Client.updatedAt moves only when something really changed: the same values sent again leave it as it was. A client the print shop deactivated (isActive: false) takes no change from an API key, nor do its contacts, addresses, notes and tags.
| Wymagany zakres | clients:write |
|---|---|
| Dostępne od | Prynt 0.28.0 |
| Stabilność | Beta (co to znaczy) |
| Ponawianie | Operacja idempotentna: ponowienie bez nagłówka Idempotency-Key jest bezpieczne. Zapisy i idempotencja |
Argumenty
| Nazwa | Typ | Opis |
|---|---|---|
idwymagane | ID! | Identifier of the client to change. |
inputwymagane | UpdateClientInput! | What to change: fields left out keep their values. An explicit null is refused unless the field says otherwise. |
Zwraca
Przykład
mutation UpdateClient($id: ID!, $input: UpdateClientInput!) { updateClient(id: $id, input: $input) { id email phone tags { name } updatedAt }}{ "id": "6c2e4a1b-7d3f-4e5a-9b8c-0d1e2f3a4b5c", "input": { "phone": null, "tagIds": [ "8e4a6c3d-9f5b-4a7c-8d0e-2f3a4b5c6d7f" ] }}curl -sS https://twoja-drukarnia.prynt.pl/api/v1/graphql \ -H "Authorization: Bearer $PRYNT_API_KEY" \ -H "Content-Type: application/json" \ --data-binary @- <<'JSON'{ "query": "mutation UpdateClient($id: ID!, $input: UpdateClientInput!) {\n updateClient(id: $id, input: $input) {\n id\n email\n phone\n tags {\n name\n }\n updatedAt\n }\n}", "variables": { "id": "6c2e4a1b-7d3f-4e5a-9b8c-0d1e2f3a4b5c", "input": { "email": "[email protected]", "phone": null, "tagIds": [ "8e4a6c3d-9f5b-4a7c-8d0e-2f3a4b5c6d7f" ] } }}JSON{ "data": { "updateClient": { "id": "6c2e4a1b-7d3f-4e5a-9b8c-0d1e2f3a4b5c", "phone": null, "tags": [ { "name": "Wydawnictwa" } ], "updatedAt": "2026-10-05T09:02:11.318Z" } }}