Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

OOTB API to fetch Referenced Content Fragment JSON along with Parent CF JSON other than GraphQL

Avatar

Community Advisor

Is there a way to fetch Referenced Content Fragment along with Parent CF JSON? 

Note: Asset API shows referenced CF URL but not Json. We have CFM nested in one level folder (Ex: /conf/xyz), hence GraphQL doesn't seem to be working and is not suitable for the use case.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @Bhuwan_B , just to clarify, is Graphql query not working for a query to a content fragment that has a property that references to another content fragment? 

 

query {
  contentFragmentByPath(path: "/content/my-site/my-folder/my-content-fragment") {
    ... on ContentFragment {
      title0
      description0
      otherContentFragment{
        ... on ContentFragment {
          title1
          desc1
          image1{
            url
            altText
          }
        }
      }
    }
  }
}

Above query type has been tried or its not applicable to current question?

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @Bhuwan_B , just to clarify, is Graphql query not working for a query to a content fragment that has a property that references to another content fragment? 

 

query {
  contentFragmentByPath(path: "/content/my-site/my-folder/my-content-fragment") {
    ... on ContentFragment {
      title0
      description0
      otherContentFragment{
        ... on ContentFragment {
          title1
          desc1
          image1{
            url
            altText
          }
        }
      }
    }
  }
}

Above query type has been tried or its not applicable to current question?