Create a customer (if you are allowed to create customers)
mutation {
CreateCustomer (
input: {
label: "Bob Dylan",
first_name: "Bob",
last_name: "Dylan",
email: "[email protected]"
}
){
id
active
}
}
{
"data": {
"CreateCustomer": {
"id": 101122,
"active": true
}
}
}
Update a customer
id - ID |
---|
Id of the customer to update |
mutation UpdateCustomer($id: ID!, $input: CustomerInput!) {
UpdateCustomer(id: $id, input: $input) {
id
label
first_name
last_name
email
}
}
{
"id": 100005,
"input": {
"id": 100005,
"label": "Hoppe",
"first_name": "Palma",
"last_name": "Heaney",
"email": "[email protected]"
}
}
{
"data": {
"UpdateCustomer": {
"id": 100005,
"label": "Hoppe",
"first_name": "Palma",
"last_name": "Heaney",
"email": "[email protected]"
}
}
}
Delete a customer
id - ID |
---|
Id of the customer |
mutation DeleteCustomer($id: ID!) {
DeleteCustomer(id: $id)
}
{
"data": {
"DeleteCustomer": true
}
}
Disable a customer
id - ID |
---|
Id of the customer |
mutation DisableCustomer($id: ID!) {
DisableCustomer(id: $id) {
id
active
}
}
{
"data": {
"DisableCustomer": {
"id": 100011,
"active": false
}
}
}
Enable a disabled customer
id - ID |
---|
Id of the customer |
mutation EnableCustomer($id: ID!) {
EnableCustomer(id: $id) {
id
active
}
}
{
"data": {
"EnableCustomer": {
"id": 100011,
"active": true
}
}
}
label - String |
---|
Full name of the customer |
first_name - String |
---|
First name of the customer |
last_name - String |
---|
Last name of the customer |
email - String |
---|
Email of the customer |