Difficulties with resolve_links

Hi there,

I’ve been working with getting a navigation component set up on my site, and for the links I’m trying to use resolve_links=url to get the slug for the internal link I’ve setup. Looking at the object I get from the blok, it doesn’t seem to be adding the ‘story’ object like it shows in this changelog:

{
  "url": {
    "id": "57e56eab-8eb5-44b8-bc50-4ab462a1b812",
    "url": "",
    "linktype": "story",
    "fieldtype": "multilink",
    "cached_url": "activities"
  },
}

Any ideas where I’m going wrong?

Thanks

Hello Zac,

a call utilizing the value for getting a story instead of a link object would look like this example:
https://api.storyblok.com/v1/cdn/stories/relations/test_story_relations?version=draft&token=x9QbpDUOrv86WLq812mfUQtt&cv=1589758382&resolve_links=story
This is a complete story with a resolved link:

    "story": {
        "name": "test_story_relations",
        "created_at": "2020-05-17T23:16:10.827Z",
        "published_at": "2020-05-17T23:33:44.384Z",
        "alternates": [],
        "id": 11636175,
        "uuid": "a4a9be74-808d-4748-a8a0-9d3d243c9f99",
        "content": {
            "_uid": "9271d945-e26c-4632-b105-44e07fbe9ea6",
            "component": "relations",
            "link_example": {
                "id": "bbf7a722-d027-4d9d-b2b1-029f93225a08",
                "url": "",
                "linktype": "story",
                "fieldtype": "multilink",
                "cached_url": "/mister-master",
                "story": {
                    "name": "Mister Master",
                    "created_at": "2020-01-20T19:14:12.376Z",
                    "published_at": "2018-04-13T14:08:40.226Z",
                    "alternates": [],
                    "id": 5797535,
                    "uuid": "bbf7a722-d027-4d9d-b2b1-029f93225a08",
                    "content": {
                        "_uid": "b4d61106-3646-4dd5-aab0-5b9e8118c400",
                        "name": "Mister Master",
                        "image": "//a.storyblok.com/f/43698/1000x1000/805c6425d4/img_round.png",
                        "component": "author",
                        "_editable": "\u003c!--#storyblok#{\"name\": \"author\", \"space\": \"73641\", \"uid\": \"b4d61106-3646-4dd5-aab0-5b9e8118c400\", \"id\": \"5797535\"}--\u003e"
                    },
                    "slug": "mister-master",
                    "full_slug": "authors/mister-master",
                    "sort_by_date": null,
                    "position": -10,
                    "tag_list": [],
                    "is_startpage": false,
                    "parent_id": 5797525,
                    "meta_data": null,
                    "group_id": "94c95af7-c39a-471d-98ca-f1d888b78564",
                    "first_published_at": "2018-04-13T14:08:40.226Z",
                    "release_id": null,
                    "lang": "default",
                    "path": null,
                    "translated_slugs": []
                }
            },
            "_editable": "\u003c!--#storyblok#{\"name\": \"relations\", \"space\": \"73641\", \"uid\": \"9271d945-e26c-4632-b105-44e07fbe9ea6\", \"id\": \"11636175\"}--\u003e"
        },
        "slug": "test_story_relations",
        "full_slug": "relations/test_story_relations",
        "sort_by_date": null,
        "position": 0,
        "tag_list": [],
        "is_startpage": false,
        "parent_id": 11636174,
        "meta_data": null,
        "group_id": "e48e4b1b-45ec-44e3-bb6a-a864bd2864cf",
        "first_published_at": "2020-05-17T23:19:05.406Z",
        "release_id": null,
        "lang": "default",
        "path": null,
        "translated_slugs": []
    }
}

The example you’ve seen in the change log entry shows a shortened version of a story without a lot of fields and it doesn’t show a resolved story but a link object.

But according to the documentation the shortened story object should contain the full_slug. So i think Zac is right, that there is missing information. As the documentation displays different results than the actual requests with resolve_links=url. It does not match! i already created a bug for that problem where i describe it in more detail as well as a github issue. But for any reason i am not allowed to link to both.

So i share the Links as code, so you can copy from it:

https://forum.storyblok.com/t/resolve-links-does-not-work-as-described-according-the-documentation/640

and

https://github.com/storyblok/storyblok/issues/694