const Posts: CollectionConfig = {
slug: 'posts',
fields: [
{
name: 'tags',
type: 'relationship',
relationTo: 'tags',
hasMany: true,
admin: {
position: 'sidebar',
},
},
]
something like this:
const query = {
tags: {
equals: 'tech',
},
}
it's works when i'm passing mongoDb id instead of text.