I’m trying to fetch posts like category->blog_post->post1,post2...
, but some category has no post. So I want to skip/filter those categories. How can I do that?
Query:
query MyQuery {
allContentfulCategory(limit: 10, filter: {}) {
edges {
node {
slug
name
blog_post {
slug
}
}
}
}
}
I was trying to filter like this: filter: {blog_post: {ne: null}}
but it says there’s is no ne
property in blog_post instead it has elemMatch
property