How does Upsert fields value to null

upsert{
  query{
    q(func: eq(ENTERPRISE.ENTERPRISE_SOCIAL_SECURITY.ID,1)) {
      v as uid
    }
  }
  mutation{
    set{
      uid(v) <ENTERPRISE.ENTERPRISE_SOCIAL_SECURITY.PERSION_COVERAGE_NUM> "3" .
      uid(v) <ENTERPRISE.ENTERPRISE_SOCIAL_SECURITY.ID> "1" .
      uid(v) <ENTERPRISE.ENTERPRISE_SOCIAL_SECURITY.INSURE_START_YEAR> "null" .
    }
  }
}

For example, in the syntax above, if it is string type “null”, it is ok, but if the field is an int the string “null” will get an error. If the field is an int what if it is an empty property via the upstate syntax, then the problem is if it is string “null”, the query is still string “null”, not really NULL

Hi @wangliujing,

DQL scalars don’t support null values.

If nullability is important to you, then please give the Graphql API a try. Graphql Scalars are nullable as mentioned here.
Here’s a sample response from a Graphql query with null value for an int field (age) and string field (textB).

{
 "data": {
   "getPerson": {
     "textA": "dude b",
     "textB": null,
     "name": "dude_b",
     "age": null
   }
 }
}