Skip to content

Instantly share code, notes, and snippets.

@gwdt
Created November 21, 2020 23:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gwdt/04c6fc8450616b99a9adcf68f5cc4ca1 to your computer and use it in GitHub Desktop.
Save gwdt/04c6fc8450616b99a9adcf68f5cc4ca1 to your computer and use it in GitHub Desktop.
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