Skip to content

Commit

Permalink
ResolvedType
Browse files Browse the repository at this point in the history
  • Loading branch information
agriffard committed Apr 9, 2021
1 parent c97640f commit 257dc55
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ private static IQuery<ContentItem, ContentItemIndex> FilterContentType(IQuery<Co
throw new ArgumentNullException(nameof(context));
}

var contentType = ((ListGraphType)(context.FieldDefinition).ResolvedType).ResolvedType.Name;
var contentType = context.FieldDefinition.ResolvedType.Name;
return query.Where(q => q.ContentType == contentType);
}

Expand Down

1 comment on commit 257dc55

@carlwoodhouse
Copy link
Member

@carlwoodhouse carlwoodhouse commented on 257dc55 Apr 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn’t right @agriffard it has to cast the resolved type to a list first because the actual type is wrapped in a list object. I changed it to fix 90% of the integration tests - the filter unit tests need some changes I just haven’t pushed yet

Please sign in to comment.