World is now on Opti ID! Learn more

Query Optimizely Graph with Strawberry Shake

Vote:
 

When querying Optimizely Graph for content in contentareas using Strawberry Shake it seems that we only can get the expanded result from the first area in the query.

If I have this in the query I only get values in the result från ContentArea1. The result from ContentArea2 only contain null values. If I remove the ContentArea1 part from the query I get correct values from ContentArea2. Is there a setting or something else preventing me from getting results from multiple areas in the same query?

ContentArea1 {
      ContentLink {
        Expanded {
          ... on BlockType1 {
            Property1
            Property2
          }
        }
      }
    }
  ContentArea2 {
      ContentLink {
        Expanded {
          ... on BlockType2 {
            Property1
            Property2
          }
        }
      }
    }

 

 

#338539
May 22, 2025 11:56
Johan Kronberg - May 23, 2025 11:05
Do the results look as expected when running the query in GraphiQL?
Vote:
 

Yes, running the same query in GraphiQL gives me correct result

#338593
May 23, 2025 11:12
Vote:
 

Try using GuidValue or Id for the ContentLink like.

        ContentLink {
          GuidValue
          Expanded {
            ... on MyContentType {
 
This should fetch you appropriate data in the strawberry shake client
#338604
Edited, May 23, 2025 15:29
* 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.