Array Field NULL response


In our model, we have an Article with an array field of reference for Category.

Unfortunately, when I pull entries with the delivery SDK the first item in the array is always null.

I did run a migration to copy from another field into a new categories field… i’m wondering if it created it differently…

i’m a little lost so any help is appreciated!

Digging into the Contentful Client, I see it has both when it deserializes but it always fails to resolve the first one:


var query = QueryBuilder<ContentfulArticleModel>.New
                .FieldIncludes("fields.slug", ids)
            var result = await _cmsClient.GetEntries(query, token);
            return result;


internal class ContentfulArticleModel
    public SystemProperties Sys { get; set; }

    public string Title { get; set; }

    public string Excerpt { get; set; }

    public string[] Tags { get; set; }

    public string Slug { get; set; }

    public ContentfulCategoryModel[] Categories { get; set; }
    public Asset SmallThumbnail { get; set; }

    public AlgoliaArticleModel Convert()
        return new AlgoliaArticleModel
            ObjectId = Sys.Id,
            Title = Title,
            Content = Excerpt ?? Title,
            Tags = Tags != null && Tags.Any() ? string.Join(",", Tags) : string.Empty

and finally ContentfulCategoryModel

internal class ContentfulCategoryModel
    public string Title { get; set; }

Many thanks to Contentful support!
My issue was related to the SDK consolidating responses, it was resolved by the solution in this blog post