Skip to content

UHeadless Options

The UHeadlessOptions class provides configuration options for the UHeadless package. These options can be used to customize various aspects of UHeadless behavior.

PropertyDescription
PropertyServicesOptionsOptions for configuring the property services.
TracingOptionsOptions for configuring Apollo tracing.
UHeadlessGraphQLOptionsOptions for configuring UHeadless GraphQL functionality.
PropertyDescription
GraphQLExtensionsUsed to configure HotChocolate with any custom configuration
PropertyValueTypesA collection of the types in the solution that implement the PropertyValue interface. This is populated automatically.
PropertyDescription
TracingPreferenceSpecifies the preference for enabling tracing in Apollo.
TimestampProviderITimestampProvider
PropertyDescription
PropertyMapOptionsOptions for configuring the property map.
PropertyDescription
PropertyMappingsA list of custom mappings for properties.
PropertyMapThe property map used for mapping properties.

To configure the UHeadless options, use the .AddUHeadless() method and provide an instance of UHeadlessOptions with the desired settings.

Example usage:

.AddUHeadless(new()
{
PropertyServicesOptions = new()
{
PropertyMapOptions = new()
{
PropertyMappings = new List<Action<IPropertyMap>>
{
(map) => map.AddEditorMapping<CustomBlockListModel>(Constants.PropertyEditors.Aliases.BlockList),
(map) => map.AddAliasMapping<CustomMediaPicker>("myContentType", "myPropertyAlias")
}
}
}
})

These options allow you to configure property services, Apollo tracing, and UHeadless GraphQL functionality. Customize the options according to your specific requirements.