GraphQL content fragment response customize additional fields | Community
Skip to main content
Level 4
Apr 25, 2022 9:34 AM UTC
Solved

GraphQL content fragment response customize additional fields

By default , graph QL query for a content fragment and an ImageReference inside content fragment gives _author_url and _publish_url.

How can we either customize either the publish URL to give scene7 urls for images or add an additional field in there?

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
aanchal-sikka
aanchal-sikkaAccepted solution
New Participant
Sep 3, 2023 12:21 PM UTC

Hello @asn11 

 

Please have a look at following Adobe documentations:

https://experienceleague.adobe.com/docs/experience-manager-learn/getting-started-with-aem-headless/how-to/images.html?lang=en

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/headless/graphql-api/content-fragments.html?lang=en#web-optimized-image-delivery-in-graphql-queries 

https://experienceleague.adobe.com/docs/experience-manager-core-components/using/developing/web-optimized-image-delivery.html?lang=en 

 

GraphQL supports web-optimized URLs like:

{
  "data": {
    "adventureByPath": {
      "item": {
        "_path": "/content/dam/wknd-shared/en/adventures/bali-surf-camp/bali-surf-camp",
        "title": "Bali Surf Camp",
        "primaryImage": {
          "_dynamicUrl": "/adobe/dynamicmedia/deliver/dm-aid--a38886f7-4537-4791-aa20-3f6ef0ac3fcd/adobestock_175749320.jpg?preferwebp=true&width=1000&quality=80"
        }
      }
    }
  }
}

 

 

 

Aanchal Sikka

1 reply

aanchal-sikka
aanchal-sikkaAccepted solution
New Participant
Sep 3, 2023 12:21 PM UTC

Hello @asn11 

 

Please have a look at following Adobe documentations:

https://experienceleague.adobe.com/docs/experience-manager-learn/getting-started-with-aem-headless/how-to/images.html?lang=en

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/headless/graphql-api/content-fragments.html?lang=en#web-optimized-image-delivery-in-graphql-queries 

https://experienceleague.adobe.com/docs/experience-manager-core-components/using/developing/web-optimized-image-delivery.html?lang=en 

 

GraphQL supports web-optimized URLs like:

{
  "data": {
    "adventureByPath": {
      "item": {
        "_path": "/content/dam/wknd-shared/en/adventures/bali-surf-camp/bali-surf-camp",
        "title": "Bali Surf Camp",
        "primaryImage": {
          "_dynamicUrl": "/adobe/dynamicmedia/deliver/dm-aid--a38886f7-4537-4791-aa20-3f6ef0ac3fcd/adobestock_175749320.jpg?preferwebp=true&width=1000&quality=80"
        }
      }
    }
  }
}

 

 

 

Translate
Aanchal Sikka