Is it possible to filter blog posts by tag using GraphQL (like in the api)?

I have seen how it is possible to filter blog posts by tag using the API, but that doesn’t seem to be the case for GraphQL? Or perhaps I am just having a hard time figuring it out. I have been on the GraphQL playground and cannot determine if there is a solution. Would appreciate any help.

Hi @cathhive :waving_hand:

As best I can tell, it is not possible to filter Blog Posts by Tag when querying HubSpot via GraphQL. The best option I can see is to get all Blog Posts (alongside any relevant Tag IDs) and then filtering the results yourself. For example:

query MyQuery {
 BLOG {
 post_collection {
 items {
 tag_ids
 blog_tags {
 name
 }
 }
 }
 }
}

It seems strange that this can be achieved using HubSpot’s REST API, but not GraphQL :person_shrugging:

Hopefully I’m wrong and someone else can point you in a better direction.

Regardless, I hope this proves useful. Please let me know if you have any follow-up questions.

I am also looking for a solution here. Seems a bit strange to not allow filtering by tags…
Did you find a solution?