Take the community feedback survey now.

Query blocks in Graph QL

Vote:
 

I'm new to Graph QL and ContentGraph and want to know if there is a way to query blocks that's on a page? Lets say I have a textblock that contains information about "Our shirts" on a page, if I do a search on "shirts", I want to get a result with the page containing that textblock.

#339915
Aug 11, 2025 7:53
Vote:
 

Am not sure if Content Graph supports filtering on nested block properties within content areas. However you could do something like this (unless you find a query example with filter)

Get Page types you need by expanding the content area on the types you are looking to filter on and then do client side filtering for the word in the expanded item.

 

#340102
Aug 25, 2025 18:18
Vote:
 

Hi Frida,

Here is a sample query about querying block on a content area in page

query MyQuery {
  HomePage {
    item {
      MainContentArea {
        ContentLink {
          Expanded {
            Name
            ... on FreeTextBlock {              
              HeadingBlock {
                Heading
                HeadingStyle
                HeadingAlignment
              }
              Content
            }
          }
        }
      }
    }
  }
}
#340134
Aug 29, 2025 4:04
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.