MutacjaBetaMutation.updateSupplier
Changes a supplier: a field left out keeps its value, null clears an optional field. Supplier.updatedAt moves only when something really changed: the same values sent again leave it as it was.
| Wymagany zakres | warehouse: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 supplier to change. |
inputwymagane | UpdateSupplierInput! | What to change: fields left out keep their values. An explicit null is refused unless the field says otherwise. |
Zwraca
Przykład
mutation UpdateSupplier($id: ID!, $input: UpdateSupplierInput!) { updateSupplier(id: $id, input: $input) { id email contactPerson updatedAt }}{ "id": "3f6b2a1c-8d4e-4f5a-9b6c-1d2e3f4a5b06", "input": { "contactPerson": null }}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 UpdateSupplier($id: ID!, $input: UpdateSupplierInput!) {\n updateSupplier(id: $id, input: $input) {\n id\n email\n contactPerson\n updatedAt\n }\n}", "variables": { "id": "3f6b2a1c-8d4e-4f5a-9b6c-1d2e3f4a5b06", "input": { "email": "[email protected]", "contactPerson": null } }}JSON{ "data": { "updateSupplier": { "id": "3f6b2a1c-8d4e-4f5a-9b6c-1d2e3f4a5b06", "contactPerson": null, "updatedAt": "2026-10-05T09:30:00.000Z" } }}