Create a supplier
mutation {
CreateSupplier(
input: {
label: "3M",
email: "[email protected]",
phone: "0612261267",
address: {
country: "GB",
state: null,
address_1: "",
city: "London"
},
currency: "GBP"
}
) {
id
label
email
phone
active
currency
address {
id
label
country
address_1
address_2
postal_code
city
state
phone
}
}
}
{
"data": {
"CreateSupplier": {
"id": 100012,
"label": "3M",
"email": "[email protected]",
"phone": "0612261267",
"active": true,
"currency": "GBP",
"address": {
"id": 100075,
"label": null,
"country": "GB",
"address_1": null,
"address_2": null,
"postal_code": null,
"city": "London",
"state": null,
"phone": null
}
}
}
}
Update a supplier
id - ID |
---|
Id of the supplier |
mutation UpdateSupplier($id: ID!, $input: SupplierInput!) {
UpdateSupplier(id: $id, input: $input) {
id
active
}
}
{
"id": 100012,
"input": {
"id": 100012,
"label": "3M",
"email": "[email protected]",
"phone": "0612261267",
"currency": "GBP",
}
}
{
"data": {
"UpdateSupplier": {
"id": 100012,
"active": true,
}
}
}
Delete a supplier
id - ID |
---|
Id of the supplier |
mutation DeleteSupplier($id: ID!) {
DeleteSupplier(id: $id)
}
{
"data": {
"DeleteSupplier": true
}
}
Disable a supplier
id - ID |
---|
Id of the supplier |
mutation DisableSupplier($id: ID!) {
DisableSupplier(id: $id) {
id
active
}
}
{
"data": {
"DisableSupplier": {
"id": 100012,
"active": false
}
}
}
Enable a disabled supplier
id - ID |
---|
Id of the supplier |
mutation EnableSupplier($id: ID!) {
EnableSupplier(id: $id) {
id
active
}
}
{
"data": {
"EnableSupplier": {
"id": 100012,
"active": true
}
}
}
id - Int |
---|
Unique identifier of the supplier |
label - String |
---|
Name of the supplier |
email - String |
---|
Email of the supplier |
phone - String |
---|
Phone number of the supplier |
currency - String |
---|
Currency code (EUR, USD, ...) |