A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

Optimizely Graph (CMS 12): Support for IList<T> / PropertyList<T> with POCOs?

Vote:
 

Hi all,

we are using Optimizely CMS 12 with Optimizely Graph and have a content type that contains a list property based on PropertyList<T>:

public class MyItem {
   public string Label { get; set; }
   public int Value { get; set; } }
public class MyPage : PageData {
   public virtual IList<MyItem> Items { get; set; }
}

In the CMS editor this works fine, but in Optimizely Graph the Items property does not appear in the schema after a full sync, so we cannot query it via GraphQL.

My questions:

  1. Is PropertyList<T> / IList<T> with a POCO (or T : IContent) officially supported for Optimizely Graph schema generation?

  2. If not, is there any recommended pattern (e.g. Conventions API, block-based model, custom data sync) to make these list items available in Graph?

  3. Is there any plan on the roadmap to support IList<T> / PropertyList<T> directly in Optimizely Graph, or should we avoid this pattern for headless use cases?

We tried adding it over

  1. services.AddContentGraph(options =>
    {
        options.SyncReferencingContents = true;
        options.IncludeInheritanceInContentType = true;
        options.Include.ContentTypes = new[]
        {
  2. conventionRepository.ForInstancesOf<MyType>()
                ?.IncludeField(field => field.Items!)
  3. conventionRepository.ForInstancesOf<MyType>()
                ?.Set(field => field.Items, IndexingType.Queryable)

Thanks in advance for any guidance or best practices!

#341194
Edited, Dec 02, 2025 11:45
Vote:
 

IList<T> Properties Not Synchronized to ContentGraph - A Debugging Discovery

The Investigation

While debugging why certain IList<Items> properties weren't appearing in the ContentGraph schema, I traced the issue to the ListPropertyConverterProvider class.

The Finding

In the Resolve method of ListPropertyConverterProvider, there's a type check that determines whether a property should be converted:

public IPropertyConverter Resolve(PropertyData propertyData)
{
    return !(propertyData is PropertyCollection) ? null : ...
}

The issue: When propertyData represents an IList<T> property, it's not recognized as a PropertyCollection. The type check fails, the method returns null, and consequently no converter is assigned to handle this property type.

The Result

Without a valid IPropertyConverter, these properties are excluded from the ContentGraph schema entirely. They don't appear in the GraphQL API and cannot be queried.

The Question

Is this a bug or a missing implementation?

It seems counterintuitive that list-based properties would be explicitly filtered out. The ListPropertyConverter exists and appears designed to handle collection types, but the resolver prevents it from ever being used for IList<T> properties.

Should IList<T> properties be supported, or is this intentional behavior that requires a workaround (e.g., using PropertyCollection or implementing a custom IPropertyConverterProvider)?

#341214
Dec 03, 2025 14:26
Vote:
 

Hi Alexander,

Would it be an option to switch from using IList<T> with POCOs to IList<BlockType>? From my experience using Graph with Paas CMS, block-based lists work well with Optimizely Graph and also give you a nicer editing experience in the CMS.

#341219
Dec 04, 2025 14:15
Vote:
 

Hi,

I could solve by adding a 

public class CustomListPropertyConverterProvider : IPropertyConverterProvider
and I handle there in resolve the IList<T> with this I got all IList<T> (PropertyList<T>) in the Graph schema

#341220
Dec 04, 2025 15:27
Vote:
 

Thank you for the finding. I will forward this to the CG development team, if you haven't already?

#341226
Dec 05, 2025 10:37
Alexander Seel - Dec 05, 2025 15:10
Hi, eventually you can also take a look on this what we found => https://world.optimizely.com/forum/developer-forum/cms-12/thread-container/2025/12/incompatibility-optimizely.contentgraph.cms-4.2.0-and-optimizely.graph.commerce-1.3.0
Vote:
 

that would be great thanks

 

#341229
Dec 05, 2025 13:50
Vote:
 

I talked with our lead engineer in Content Graph/CMS team, and he said that is pretty much as designed - it's never been supported. So you need to either add a converter, or just use a list of blocks.

#341307
Dec 18, 2025 9:42
Vote:
 

Hi Quan,

but that means that PropertyList are not part of the ContentGraph schema/concept?

I think that would be a very big restrictation and should be visible in the documentation with a sample how to get them to the graph.

We did this allready but figured out that when in such list properties like LinkItem it make it not so easy to get them also back to get converted in the schema.

For example a List property like this, would good to have a sample in the documentation for everybody

public class Item {
    public LinkItem {get;set;}
    public string Name {get;set;}  
}

public class Test{

    [BackingType(typeof(ItemProperty)]
    public virtual IList<Item> Items {get;set;}

}

[PropertyDefinitionTypePlugIn]
public class ItemProperty: PropertyList<Item>
{
}
#341310
Dec 18, 2025 12:34
Vote:
 

Without a custom converter it will be very difficult, and usually - problematic for us to serialize/deserialize the data. The document can be found here 

Convert from IContent to ContentApiModel

#341311
Dec 18, 2025 13:09
Vote:
 

Hi,

so this means for the LinkItem in this case I have to make a LinkItemDto and create my own converter logic with resolving url etc., because at this point I can't use the LinkItem which allready is in the schema.

I mean the LinkItem has also not a resolved URL property in the current schema. So either way we need to make a own Model to get the resolved Url.

Is this right?

Kind regards

#341313
Edited, Dec 18, 2025 15:41
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.