Skip to content

Latest commit

 

History

History
49 lines (48 loc) · 1016 Bytes

SET_VALUE.md

File metadata and controls

49 lines (48 loc) · 1016 Bytes

SET VALUE Mutation

Query

mutation SET_VALUE($doctype: String!, $name: String!, $fieldname: String!, $value: String!) {
    setValue(doctype: $doctype, name: $name, fieldname: $fieldname, value: $value) {
        doctype,
        name,
        fieldname,
        value,
        doc {
            name,
            ...on User {
                first_name,
                last_name,
                full_name
            }
        }
    }
}

Variables

{
    "doctype": "User",
    "name": "[email protected]",
    "fieldname": "first_name",
    "value": "Test X"
}

Response

{
    "data": {
        "setValue": {
            "doctype": "User",
            "name": "[email protected]",
            "fieldname": "first_name",
            "value": "Test",
            "doc": {
                "name": "[email protected]",
                "first_name": "Test X",
                "last_name": "Test A",
                "full_name": "Test X Test A"
            }
        }
    }
}