mordred
mordred copied to clipboard
Support filters in GraphQL query
We can implement some common MongoDB query operators: https://docs.mongodb.com/manual/reference/operator/query/ https://www.gatsbyjs.org/docs/graphql-reference/#intro
{
allMarkdown(filter: {frontmatter__tags: {elemMatch: {eq: 'post'}}} {
nodes {
id
}
}
}
Get nodes with frontmatter tags containing post
Maybe not necessary, you can manually call .filter on your result 🤔