I have a collection with a m2o field on it. The m2o field is required to be set on creation. I would query it like this
myCollection {
myRelation {
name
}
}
But if an editor archives the value that myRelation points to, we have an issue! myRelation is null. So, I need to filter out myCollection that have a myRelation that is null. But there is no way to do this! I can only filter out `myCollections that have a myRelation which have a null field, eg:
myCollection(filter: {myRelation: {id: { _nnull: true}}}) {
myRelation {
name
}
}
But theres the rub. Since myRelation is null, its id field is NOT null. It is simply… not. It doesn’t exist. So how can I filter out items which have a m2o which point to an archived item? Thanks!