metaobject Upsert
Requires access scope.
Creates or updates a Metaobject based on its handle. If a metaobject with the specified handle exists, the mutation updates it with the provided field values. If no matching metaobject exists, the mutation creates a new one.
The handle serves as a unique identifier within a metaobject type. Field values map to the 's field keys and overwrite existing values during updates.
Arguments
- handle (MetaobjectHandleInput!)
- metaobject (MetaobjectUpsertInput)
- values (JSON)
- Anchor to handlehandle•Metaobject
Handle Input! required The identifier of the metaobject to upsert.
- Anchor to metaobjectmetaobject•Metaobject
Upsert Input The parameters to upsert the metaobject. Only the fields you provide are updated. Cannot be used in conjunction with
values.- Anchor to valuesvalues•JSON
The values of the metaobject as a JSON object keyed by field definition key. This is a full replacement — omitted keys are cleared on an existing record. Cannot be used in conjunction with
metaobject.
- metaobject (Metaobject)
- userErrors ([MetaobjectUserError!]!)
- Anchor to metaobjectmetaobject•Metaobject
The created or updated metaobject.
- Anchor to userErrorsuser•[Metaobject
Errors User Error!]! non-null The list of errors that occurred from executing the mutation.