Not getting data content relationship links from a slice

Describe your question/issue in detail

Not getting data content relationship links from a slice
I need help to write a graph query to fetch linked documents inside a slice. A linked document can be any custom type, is there any way to fetch it dynamically?

Home page---
---Slice type=> our_services
----Custon type => our_services

{
                    "variation": "default",
                    "version": "initial",
                    "items": [],
                    "primary": {
                        "title": "Driving business value through partner-focused services",
                        "description": [
                            {
                                "type": "paragraph",
                                "text": "With our deep domain expertise, innovation and commitment to excellence driving each service, we're dedicated to delivering comprehensive, result-oriented, and high-value solutions to our partners across all business lines.",
                                "spans": [],
                                "direction": "ltr"
                            }
                        ],
                        "service": [
                            {
                                "add_services": {
                                    "id": "Zp98ZBMAACIAEyRz",
                                    "type": "our_services",
                                    "tags": [],
                                    "lang": "en-us",
                                    "slug": "corporate-function-services-cfs",
                                    "first_publication_date": "2024-07-23T09:48:31+0000",
                                    "last_publication_date": "2024-07-23T09:48:31+0000",
                                    "uid": "corporate-function-services-cfs",
                                    "link_type": "Document",
                                    "isBroken": false
                                }
                            },
                            {
                                "add_services": {
                                    "id": "Zp98QRMAACEAEyQ0",
                                    "type": "our_services",
                                    "tags": [],
                                    "lang": "en-us",
                                    "slug": "insurance-operations-services-ios",
                                    "first_publication_date": "2024-07-23T09:48:10+0000",
                                    "last_publication_date": "2024-07-23T09:48:10+0000",
                                    "uid": "insurance-operations-services-ios",
                                    "link_type": "Document",
                                    "isBroken": false
                                }
                            },
                            {
                                "add_services": {
                                    "id": "Zp98HhMAACEAEyPs",
                                    "type": "our_services",
                                    "tags": [],
                                    "lang": "en-us",
                                    "slug": "data-analytics--ai-services-daas",
                                    "first_publication_date": "2024-07-23T09:47:33+0000",
                                    "last_publication_date": "2024-07-23T09:47:33+0000",
                                    "uid": "data-analytics--ai-services-daas",
                                    "link_type": "Document",
                                    "isBroken": false
                                }
                            },
                            {
                                "add_services": {
                                    "id": "Zp9n8xMAACAAEwHr",
                                    "type": "our_services",
                                    "tags": [],
                                    "lang": "en-us",
                                    "slug": "technology--security-services-tss",
                                    "first_publication_date": "2024-07-23T09:47:03+0000",
                                    "last_publication_date": "2024-07-23T09:47:03+0000",
                                    "uid": "technology--security-services-tss",
                                    "link_type": "Document",
                                    "isBroken": false
                                }
                            },
                            {
                                "add_services": {
                                    "id": "Zp9k-RMAACIAEv0N",
                                    "type": "our_services",
                                    "tags": [],
                                    "lang": "en-us",
                                    "slug": "customer--transition-ct",
                                    "first_publication_date": "2024-07-23T08:10:17+0000",
                                    "last_publication_date": "2024-07-23T08:10:17+0000",
                                    "uid": "customer--transition-ct",
                                    "link_type": "Document",
                                    "isBroken": false
                                }
                            }
                        ],
                        "cta_link": {
                            "link_type": "Web",
                            "url": "google.com",
                            "target": ""
                        },
                        "cta_text": "Read more"
                    },
                    "id": "our_services$557e9bd0-4a03-4025-af4a-7f7687c1731e",
                    "slice_type": "our_services",
                    "slice_label": null
                }

Thanks,

Hi Monilal,

This is not possible. A content relationship must be restricted to one type so that you can know the same and define that structure in the GraphQuery.

Thanks,

Hi @Phil
Thanks for your quick response, Can you please help me if it is static custom type what will the graph query?

For the below query I'm getting this, but I also want "link_type": "Document"
Query:

{
        home {
          slices {
            ... on our_services {
              variation {
                ... on default {
                  primary {
                   service {
                    add_services
                   }
                  }
                }
              }
            }
          }
        }
      }

Result:

    "status": 200,
    "res": [
        {
            "id": "ZnwjbRcAACYAre8w",
            "uid": null,
            "url": null,
            "type": "home",
            "href": "",
            "tags": [
                "Home"
            ],
            "first_publication_date": "2024-06-26T14:20:02+0000",
            "last_publication_date": "2024-08-07T14:21:52+0000",
            "slugs": [
                "home"
            ],
            "linked_documents": [],
            "lang": "en-us",
            "alternate_languages": [],
            "data": {
                "slices": [
                    {
                        "variation": "default",
                        "version": "initial",
                        "items": [],
                        "primary": {
                            "service": [
                                {
                                    "add_services": {
                                        "id": "Zp98ZBMAACIAEyRz",
                                        "type": "our_services",
                                        "tags": [],
                                        "lang": "en-us",
                                        "slug": "corporate-function-services-cfs",
                                        "first_publication_date": "2024-07-23T09:48:31+0000",
                                        "last_publication_date": "2024-07-23T09:48:31+0000",
                                        "uid": "corporate-function-services-cfs",
                                        "link_type": "Document",
                                        "isBroken": false
                                    }
                                },
                                {
                                    "add_services": {
                                        "id": "Zp98QRMAACEAEyQ0",
                                        "type": "our_services",
                                        "tags": [],
                                        "lang": "en-us",
                                        "slug": "insurance-operations-services-ios",
                                        "first_publication_date": "2024-07-23T09:48:10+0000",
                                        "last_publication_date": "2024-07-23T09:48:10+0000",
                                        "uid": "insurance-operations-services-ios",
                                        "link_type": "Document",
                                        "isBroken": false
                                    }
                                },
                                {
                                    "add_services": {
                                        "id": "Zp98HhMAACEAEyPs",
                                        "type": "our_services",
                                        "tags": [],
                                        "lang": "en-us",
                                        "slug": "data-analytics--ai-services-daas",
                                        "first_publication_date": "2024-07-23T09:47:33+0000",
                                        "last_publication_date": "2024-07-23T09:47:33+0000",
                                        "uid": "data-analytics--ai-services-daas",
                                        "link_type": "Document",
                                        "isBroken": false
                                    }
                                },
                                {
                                    "add_services": {
                                        "id": "Zp9n8xMAACAAEwHr",
                                        "type": "our_services",
                                        "tags": [],
                                        "lang": "en-us",
                                        "slug": "technology--security-services-tss",
                                        "first_publication_date": "2024-07-23T09:47:03+0000",
                                        "last_publication_date": "2024-07-23T09:47:03+0000",
                                        "uid": "technology--security-services-tss",
                                        "link_type": "Document",
                                        "isBroken": false
                                    }
                                },
                                {
                                    "add_services": {
                                        "id": "Zp9k-RMAACIAEv0N",
                                        "type": "our_services",
                                        "tags": [],
                                        "lang": "en-us",
                                        "slug": "customer--transition-ct",
                                        "first_publication_date": "2024-07-23T08:10:17+0000",
                                        "last_publication_date": "2024-07-23T08:10:17+0000",
                                        "uid": "customer--transition-ct",
                                        **"link_type": "Document",**
                                        "isBroken": false
                                    }
                                }
                            ]
                        },
                        "id": "our_services$557e9bd0-4a03-4025-af4a-7f7687c1731e",
                        "slice_type": "our_services",
                        "slice_label": null
                    }
                ]
            }
        }
    ]
}

I'm not sure I understand your request @monilal.kumbhakar .

If you want the content of the add_services type this document will explain how. You have to list every field and slice which you want.

Thanks.