# Query all posts where a repeatable group contains a certain value

**URL:** <https://community.prismic.io/t/query-all-posts-where-a-repeatable-group-contains-a-certain-value/871>\
**Category:** Developing with Prismic\
**Tags:** product-feature-idea, graphql\
**Created:** [June 17, 2020, 11:58am UTC](https://community.prismic.io/t/query-all-posts-where-a-repeatable-group-contains-a-certain-value/871 "2020-06-17T11:58:30Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaue](https://avatars.discourse-cdn.com/v4/letter/k/c2a13f/32.png) [@kaue](https://community.prismic.io/u/kaue)\
**Post date:** [June 17, 2020, 11:58am UTC](https://community.prismic.io/t/query-all-posts-where-a-repeatable-group-contains-a-certain-value/871/1 "2020-06-17T11:58:30Z")

</div>

Hi there!

I need to make a query but don't know how to write it.

Basically I have a Blog Post content type. One of the fields of the blog post is a group field called with an id "tags", where you can add multiple relationship fields with an id "tag", which is another content type called Blog Tag

Basically I need to query all Blog Post's that is linked to this Blog Tag

Oh, and I'm using `gatsby-source-prismic-graphql` on Gatsby

I'd really appreciate some help on this

---

<div class="post-metadata">

**Author:** ![Pau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/pau/32/5422_2.png) [@Pau](https://community.prismic.io/u/Pau)\
**Post date:** [June 17, 2020, 3:12pm UTC](https://community.prismic.io/t/query-all-posts-where-a-repeatable-group-contains-a-certain-value/871/4 "2020-06-17T15:12:52Z")

</div>

Hello @kaue and welcome to the Prismic community forum!

Prismic has a [default tagging system](https://user-guides.prismic.io/en/articles/2690038-prismic-s-default-tagging-system) built into the writing room, you can use it while editing your documents. Is there any reason you didn’t choose to use it?

Afterwards, you’d just need to [query by tags](https://prismic.io/docs/gatsby/arguments-and-filtering/query-by-tags)

Let me know your thoughts on this option!

---

<div class="post-metadata">

**Author:** ![kaue](https://avatars.discourse-cdn.com/v4/letter/k/c2a13f/32.png) [@kaue](https://community.prismic.io/u/kaue)\
**Post date:** [June 17, 2020, 6:02pm UTC](https://community.prismic.io/t/query-all-posts-where-a-repeatable-group-contains-a-certain-value/871/5 "2020-06-17T18:02:57Z")

</div>

Hi @Pau

Unfortunately the default tagging system is not powerful enough, there are a lot of issues with it.  
The two main ones for us is that it’s just a string, there’s no way to add extra data to a tag and the second and biggest one is that tags are shared across all content types. So if there are 10 content types, each having 6 tags, then the marketing team will have to browse through 60 tags when they should be able to see just the ones that are relevant to the content type they are creating

I believe it was because of the limitations of the tag system that this article was published:

> **[Create a Custom Tagging System](https://user-guides.prismic.io/en/articles/2033431-create-a-custom-tagging-system)**
>
> Setup a custom tagging system to have more control of your tags

---

<div class="post-metadata">

**Author:** ![Pau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/pau/32/5422_2.png) [@Pau](https://community.prismic.io/u/Pau)\
**Post date:** [June 17, 2020, 10:05pm UTC](https://community.prismic.io/t/query-all-posts-where-a-repeatable-group-contains-a-certain-value/871/6 "2020-06-17T22:05:57Z")

</div>

@kaue I totally understand that this may not be ideal for all cases. I’m going to tag the [@features-team](https://community.prismic.io/groups/features-team) in this thread to let them know about this and we will add this to our feature request tracker as a possible improvement for the future.

---

<div class="post-metadata">

**Author:** ![kaue](https://avatars.discourse-cdn.com/v4/letter/k/c2a13f/32.png) [@kaue](https://community.prismic.io/u/kaue)\
**Post date:** [June 18, 2020, 9:13am UTC](https://community.prismic.io/t/query-all-posts-where-a-repeatable-group-contains-a-certain-value/871/7 "2020-06-18T09:13:27Z")

</div>

@Pau so my only choice is to use the default tagging system? Is there really no way query filtering by fields from a repeatable group?

---

<div class="post-metadata">

**Author:** ![Pau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/pau/32/5422_2.png) [@Pau](https://community.prismic.io/u/Pau)\
**Post date:** [June 18, 2020, 4:10pm UTC](https://community.prismic.io/t/query-all-posts-where-a-repeatable-group-contains-a-certain-value/871/8 "2020-06-18T16:10:10Z")

</div>

@kaue, that is correct. As explained in [this article](https://prismic.io/docs/gatsby/arguments-and-filtering/query-by-prismic-content-fields), query by groups or Slices is not yet a possibility in Gatsby/GraphQL.

If you used the REST API for your calls this will be possible: Read the [REST API] documentation([https://prismic.io/docs/rest-api/query-the-api/search-parameters-reference](https://prismic.io/docs/rest-api/query-the-api/search-parameters-reference)) to learn more.

Both technologies have their individual benefits.

---

<div class="post-metadata">

**Author:** ![Pau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/pau/32/5422_2.png) [@Pau](https://community.prismic.io/u/Pau)\
**Post date:** [September 23, 2020, 11:55pm UTC](https://community.prismic.io/t/query-all-posts-where-a-repeatable-group-contains-a-certain-value/871/10 "2020-09-23T23:55:41Z")

</div>

This is being tracked as an open feature request.

If you have another use-case for this feature, you can 'Flag' this topic to reopen. Please use the ❤ button to show your support for the feature and check out our [Feature Request Guidelines](https://community.prismic.io/t/feature-requests-what-do-you-already-love-what-could-be-better/844).

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/system/32/1746_2.png) [@system](https://community.prismic.io/u/system)\
**Post date:** [December 9, 2021, 5:17pm UTC](https://community.prismic.io/t/query-all-posts-where-a-repeatable-group-contains-a-certain-value/871/11 "2021-12-09T17:17:37Z")

</div>


