Skip to content
Developerhome
Sage Distribution and Manufacturing Operations

Mutation: Record update

  Less than to read

An update starts with a mutation and the node where the mutation occurs. Then, there is an update() section with a data section that must include the _id value.

The following table displays an example and the result of a mutation to update a record. Some of the fields displayed are not mandatory and others have been omitted.

mutation { 
    xtremSales { 
        salesOrder { 
            update( 
                data: { 
                    _id: "599", 
                    customerNumber: "12345" 
                }
            ), 
            { 
                _updateStamp 
            } 
        } 
    }
} 
{ 
"data": { 
    "xtremSales": { 
        "salesOrder": { 
            "update": { 
                "_updateStamp": "2023-03-17T08:45:23.469Z" 
            } 
        } 
    } 
}, 
    "extensions": { 
        "diagnoses": [] 
    }
}