mordred icon indicating copy to clipboard operation
mordred copied to clipboard

Support filters in GraphQL query

Open egoist opened this issue 5 years ago • 1 comments

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

egoist avatar Apr 24 '20 18:04 egoist

Maybe not necessary, you can manually call .filter on your result 🤔

egoist avatar Sep 01 '20 17:09 egoist