Support for Trash Status Filtering via exposing _deleted property in query filters to improve duplicate result handling
We have use cases where we need to search content to determine if an item is in the Trash. Currently, we use the cg-include-deleted: true header as described in the documentation. However, we have observed that duplicate results are returned from the Graph for Content() items.
One result represents the original location (tombstone marker) with the property _deleted: null, while the most recent version in the index has _deleted: true.
Although we can filter out duplicates on the client side, this approach is not ideal. 
We would like the _deleted property to be available as part of ContentWhereInput so that a filter could be applied, for example:
query SearchContent(
  $limit: Int
  $skip: Int
  $contentTypes: [String!]
  $searchText: String!
) {
  Content(
    limit: $limit
    skip: $skip
    orderBy: { _ranking: RELEVANCE, _modified: DESC, }
    where: {
      _and: [
        { _deleted: { eq: true }}
        { ContentType: { in: $contentTypes } }
        { _fulltext: { match: $searchText } }
      ]
    }
  ) {
    total
    items {
      Status
      _deleted
           ContentLink {
        Id
      }
    }
  }
}
 Stephen Borgwardt
    
 shared this idea
Stephen Borgwardt
    
 shared this idea
      
    