Skip to content

GraphQL: Filter for tags that have at least one entry associated #12134

Answered by brandonkelly
julianklotz asked this question in Q&A
Discussion options

You must be logged in to vote

You can accomplish that using the relatedToEntries argument:

query {
  tags(relatedToEntries:{}) {
    title
  }
}

(You can filter down which entries the tags must be related to by passing nested arguments inside that {}, but as it stands that will return all tags that are related to any entries.)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@julianklotz
Comment options

Answer selected by brandonkelly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants