From what I'm reading these fields aren't supported? Create / Update / Delete items in Sitecore via GraphQL

Is there a way to get this to work that someone's found anywhere? We Essentially just want to store GUID or Pipe-seperated GUIDs yeah? Trying to do so doesn't seem to work? Using Sitecore 10.2.

1 Answer 1


So, Dave, you're sort of right that these fields are not supported..."out of the box"? We just did this for another field type TreeList which is similar to MultiList.

You can add fields to the GraphQL service by creating a patch file to modify the Sitecore.Services.GraphQL.Content.config. Under the Content > fieldTypeMappings > inputTypeMapping section, you add mapping to another field type.

The config patch file could look something like this:

<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/">
                            <inputTypeMapping type="Sitecore.Services.GraphQL.Content.Mutations.FieldTypeToJsonTypeMapper, Sitecore.Services.GraphQL.Content">
                                <typeMapping hint="raw:AddTypeMapping">
                                    <map field="treelist" type="Sitecore.Services.GraphQL.Content.Mutations.JsonFields.JsonChecklistField, Sitecore.Services.GraphQL.Content" />

The data need to be sent as an array to add multiple item GUIDs to the field. Your GraphQL query would by similar to this:

mutation UpdateItem {
    path: "aaaaaaaa-bbbb-cccc-dddd-5771ad6ed443"
    fields: [
        {name: "myMultilistFieldName", value: [
            ] }

So, when you do your query search, you can see the results list as a string (value) and in an array (targetIds) this way:

Items: items {
        Item: item {
          locationGroup {

As far as your need to do this for DropLink, you should be able to just add another field mapping to the same patch config file similar to that of the out-of-the-box general link mapping:

<map field="droplink" type="Sitecore.Services.GraphQL.Content.Mutations.JsonFields.JsonGeneralLinkField, Sitecore.Services.GraphQL.Content" />

Hope this helps you out.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.