sanity-plugin-tags icon indicating copy to clipboard operation
sanity-plugin-tags copied to clipboard

Filter document by tags using GraphQL

Open james2doyle opened this issue 2 years ago • 3 comments

I can't see this field in the Filter options when using GraphQL. Is there something I am missing or is the field just not supported in GraphQL?

james2doyle avatar Jun 01 '23 18:06 james2doyle

@james2doyle This works for me:

*[_type == "article" && $keyword in tags[].label] {
  ...,
}

// Params
{
"keyword": "Article Tag"
}

fluxxus avatar Oct 08 '23 16:10 fluxxus

That's groq syntax, not graphql

On Sun, Oct 8, 2023, 9:48 AM M @.***> wrote:

@james2doyle https://github.com/james2doyle This works for me:

*[_type == "article" && $keyword in tags[].label] { ..., }

// Params { "keyword": "Article Tag" }

— Reply to this email directly, view it on GitHub https://github.com/pcbowers/sanity-plugin-tags/issues/22#issuecomment-1752103306, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAK37GE7QBBZFWWNFSMW563X6LKPPAVCNFSM6AAAAAAYXJO44WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJSGEYDGMZQGY . You are receiving this because you were mentioned.Message ID: @.***>

james2doyle avatar Oct 08 '23 17:10 james2doyle

Yup, my bad.

fluxxus avatar Oct 10 '23 22:10 fluxxus