MutacjaBetaMutation.updateClientContact
Changes a contact person: a field left out keeps its value, null clears a text field. The contact must keep a name, an e-mail or a phone. The same values sent again change nothing.
| 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 |
|---|---|---|
contactIdwymagane | ID! | Identifier of the contact to change. |
inputwymagane | ClientContactInput! | What to change. |
Zwraca
Przykład
mutation UpdateClientContact($contactId: ID!, $input: ClientContactInput!) { updateClientContact(contactId: $contactId, input: $input) { id phone role isActive }}{ "contactId": "7d3f5b2c-8e4a-4f6b-9c0d-1e2f3a4b5c6d", "input": { "phone": null, "role": "Dyrektor produkcji" }}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 UpdateClientContact($contactId: ID!, $input: ClientContactInput!) {\n updateClientContact(contactId: $contactId, input: $input) {\n id\n phone\n role\n isActive\n }\n}", "variables": { "contactId": "7d3f5b2c-8e4a-4f6b-9c0d-1e2f3a4b5c6d", "input": { "phone": null, "role": "Dyrektor produkcji" } }}JSON{ "data": { "updateClientContact": { "id": "7d3f5b2c-8e4a-4f6b-9c0d-1e2f3a4b5c6d", "phone": null, "role": "Dyrektor produkcji", "isActive": true } }}