Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Adds graphql type mapping of multiroot treelist as a multilist
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/">
<sitecore>
<api>
<GraphQL>
<defaults>
<content>
<fieldTypeMappings>
<standardTypeMapping type="Sitecore.Services.GraphQL.Content.TemplateGeneration.FieldTypeToGraphQLTypeMapper, Sitecore.Services.GraphQL.Content">
<typeMapping hint="raw:AddTypeMapping">
<map field="multiroot treelist" type="Sitecore.Services.GraphQL.Content.TemplateGeneration.FieldMapping.MultilistFieldTypeFactory, Sitecore.Services.GraphQL.Content" />
</typeMapping>
</standardTypeMapping>
</fieldTypeMappings>
</content>
</defaults>
</GraphQL>
</api>
</sitecore>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment