Skip to main content
added 249 characters in body
Source Link

Here’s you can change GraphQL query that includes server URLs for this you need to use alwaysIncludeServerUrl :true.

The url field with alwaysIncludeServerUrl: true is interesting. In Sitecore, this typically means the returned URL will include the full server URL, not just the relative path. This is useful when you need absolute URLs, for example, in email communications or when sharing links externally.

query ContentCardQuery($datasource: String!) {
  datasource: item(path: $datasource, language: "en") {
    id
    name
    ... on About {
      title {
        value
      }
      url(options: { alwaysIncludeServerUrl: true })
    }
  }
}

Here I'm using home template in attached screenshot and getting the title and url field value. As shown in output I'm getting url value with server url.

enter image description here

Hope this helps!!! Let me know in case you have doubts.

Here’s you can change GraphQL query that includes server URLs for this you need to use alwaysIncludeServerUrl :true.

The url field with alwaysIncludeServerUrl: true is interesting. In Sitecore, this typically means the returned URL will include the full server URL, not just the relative path. This is useful when you need absolute URLs, for example, in email communications or when sharing links externally.

query ContentCardQuery($datasource: String!) {
  datasource: item(path: $datasource, language: "en") {
    id
    name
    ... on About {
      title {
        value
      }
      url(options: { alwaysIncludeServerUrl: true })
    }
  }
}

Hope this helps!!! Let me know in case you have doubts.

Here’s you can change GraphQL query that includes server URLs for this you need to use alwaysIncludeServerUrl :true.

The url field with alwaysIncludeServerUrl: true is interesting. In Sitecore, this typically means the returned URL will include the full server URL, not just the relative path. This is useful when you need absolute URLs, for example, in email communications or when sharing links externally.

query ContentCardQuery($datasource: String!) {
  datasource: item(path: $datasource, language: "en") {
    id
    name
    ... on About {
      title {
        value
      }
      url(options: { alwaysIncludeServerUrl: true })
    }
  }
}

Here I'm using home template in attached screenshot and getting the title and url field value. As shown in output I'm getting url value with server url.

enter image description here

Hope this helps!!! Let me know in case you have doubts.

Source Link

Here’s you can change GraphQL query that includes server URLs for this you need to use alwaysIncludeServerUrl :true.

The url field with alwaysIncludeServerUrl: true is interesting. In Sitecore, this typically means the returned URL will include the full server URL, not just the relative path. This is useful when you need absolute URLs, for example, in email communications or when sharing links externally.

query ContentCardQuery($datasource: String!) {
  datasource: item(path: $datasource, language: "en") {
    id
    name
    ... on About {
      title {
        value
      }
      url(options: { alwaysIncludeServerUrl: true })
    }
  }
}

Hope this helps!!! Let me know in case you have doubts.