I have a GraphQL API and want to filter the results based on the nested tag object. The object looks like this:
{
name
...
tags [
{
name
},
{
name
},
...
]
}
I now want to get all documents that have both tags, a tag with the name "invoice" AND a tag with the name "open". How would I do that?
I already tried doing it like this:
query {
documents (
where: { tags: { some: { name: { and: { in: [ "invoice", "open" ] } } } } }
) {
nodes {
name
tags {
name
}
}
}
}
and some other stuff, but I can't seem to get it to work.
Thanks in advance :)