Mutations - Create Records

The Create mutation is used to add a new record to Standard and External object type.

To create records in standard and external objects, the system provides a GraphQL mutation API in the format create + API name defined during object creation. This mutation allows users to add new records by supplying values for the fields defined in the object schema.

Users must provide values for all required fields to successfully create a record. Optional fields may also be included based on business requirements. During mutation execution, the input data is validated against the object schema to ensure correctness.

On successful execution, the mutation returns the newly created record. The response includes only the fields explicitly selected in the query, allowing users to control the visibility of returned data.

If required fields are missing or invalid values are provided, the mutation fails and returns appropriate error messages.

mutation MyMutation {
  createexternalObj_API(
    input: {externalObj_API: {age: 10, name: "exo_111", externalObj_external_id: "ext_101"}}
  ) {
    clientMutationId
    externalObj_API {
      age
      externalObj_id
      externalObj_external_id
      name
      nodeId
    }
  }
}

Last updated